优化登录逻辑

This commit is contained in:
阿沐 2022-05-27 19:43:49 +08:00
parent 9b3945240a
commit 0e687e242d
6 changed files with 9 additions and 7 deletions

View File

@ -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")));
}
}

View File

@ -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

View File

@ -18,6 +18,6 @@ public class PermitResource {
"/swagger-ui.html",
"/swagger-ui/**",
"/doc.html",
"/oauth/captcha"
"/sys/oauth/captcha"
};
}

View File

@ -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;

View File

@ -25,7 +25,7 @@ import java.util.Map;
* @author 阿沐 babamu@126.com
*/
@RestController
@RequestMapping("oauth")
@RequestMapping("sys/oauth")
@Tag(name="认证管理")
@AllArgsConstructor
public class SysOauthController {

View File

@ -8,7 +8,7 @@
<name>fast-boot</name>
<description>FastBoot</description>
<url>https://gitee.com/makunet</url>
<url>https://maku.net</url>
<parent>
<groupId>org.springframework.boot</groupId>