mirror of https://gitee.com/maxjhandsome/pig
🐛 Fixing a bug.fix "Request method 'POST' not supported" error on login
This commit is contained in:
parent
b0cb1e0770
commit
678b10c33a
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue