提交 678b10c3 编写于 作者: L lishangbu

🐛 Fixing a bug.fix "Request method 'POST' not supported" error on login

上级 b0cb1e07
......@@ -56,10 +56,7 @@ public class WebSecurityConfigurer extends WebSecurityConfigurerAdapter {
.authorizeRequests()
.antMatchers(
"/actuator/**",
"/oauth/logout",
"/oauth/logout/*",
"/oauth/token/page",
"/mobile/**").permitAll()
"/token/**").permitAll()
.anyRequest().authenticated()
.and().csrf().disable();
}
......
......@@ -50,7 +50,7 @@ import java.util.Map;
*/
@RestController
@AllArgsConstructor
@RequestMapping("/oauth")
@RequestMapping("/token")
public class PigTokenEndpoint {
private static final String PROJECT_OAUTH_ACCESS = SecurityConstants.PROJECT_PREFIX + SecurityConstants.OAUTH_PREFIX + "access:";
private static final String CURRENT = "current";
......@@ -98,7 +98,7 @@ public class PigTokenEndpoint {
* @param params 分页参数
* @param from 标志
*/
@PostMapping("/token/page")
@PostMapping("/page")
public R getTokenPage(@RequestBody Map<String, Object> params, @RequestHeader(required = false) String from) {
if (StrUtil.isBlank(from)) {
return null;
......
......@@ -38,7 +38,7 @@ public interface RemoteTokenService {
* @param from 内部调用标志
* @return page
*/
@PostMapping("/oauth/token/page")
@PostMapping("/token/page")
R getTokenPage(@RequestBody Map<String, Object> params, @RequestHeader(SecurityConstants.FROM) String from);
/**
......@@ -48,6 +48,6 @@ public interface RemoteTokenService {
* @param from 调用标志
* @return
*/
@DeleteMapping("/oauth/{token}")
@DeleteMapping("/token/{token}")
R<Boolean> removeToken(@PathVariable("token") String token, @RequestHeader(SecurityConstants.FROM) String from);
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册