优化登录逻辑
This commit is contained in:
parent
9b3945240a
commit
0e687e242d
|
@ -11,7 +11,7 @@ import org.springframework.context.annotation.Configuration;
|
|||
/**
|
||||
* Swagger配置
|
||||
*
|
||||
* @author 阿沐 dolinked@qq.com
|
||||
* @author 阿沐 babamu@126.com
|
||||
*/
|
||||
@Configuration
|
||||
public class SwaggerConfig{
|
||||
|
@ -35,9 +35,9 @@ public class SwaggerConfig{
|
|||
.description( "FastBoot")
|
||||
.contact(contact)
|
||||
.version("1.0")
|
||||
.termsOfService("https://gitee.com/makunet")
|
||||
.termsOfService("https://maku.net")
|
||||
.license(new License().name("MIT")
|
||||
.url("https://gitee.com/makunet")));
|
||||
.url("https://maku.net")));
|
||||
}
|
||||
|
||||
}
|
|
@ -56,6 +56,8 @@ public class AuthorizationServerConfig extends AuthorizationServerConfigurerAdap
|
|||
endpoints.exceptionTranslator(new FastWebResponseExceptionTranslator());
|
||||
// 配置授权码模式,存放在Redis中
|
||||
endpoints.authorizationCodeServices(redisAuthorizationCodeServices);
|
||||
// 自定义登录地址
|
||||
endpoints.pathMapping("/oauth/token","/sys/oauth/token");
|
||||
}
|
||||
|
||||
@Bean
|
||||
|
|
|
@ -18,6 +18,6 @@ public class PermitResource {
|
|||
"/swagger-ui.html",
|
||||
"/swagger-ui/**",
|
||||
"/doc.html",
|
||||
"/oauth/captcha"
|
||||
"/sys/oauth/captcha"
|
||||
};
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ import java.io.IOException;
|
|||
@Component
|
||||
@AllArgsConstructor
|
||||
public class ValidateCodeFilter extends OncePerRequestFilter {
|
||||
private final static String OAUTH_TOKEN_URL = "/oauth/token";
|
||||
private final static String OAUTH_TOKEN_URL = "/sys/oauth/token";
|
||||
private final CaptchaService captchaService;
|
||||
private final UserAuthenticationFailureHandler authenticationFailureHandler;
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ import java.util.Map;
|
|||
* @author 阿沐 babamu@126.com
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("oauth")
|
||||
@RequestMapping("sys/oauth")
|
||||
@Tag(name="认证管理")
|
||||
@AllArgsConstructor
|
||||
public class SysOauthController {
|
||||
|
|
Loading…
Reference in New Issue
Block a user