mirror of
https://gitee.com/dromara/MaxKey.git
synced 2026-05-14 12:32:09 +08:00
OIDC接口优化 #I4VFYD
This commit is contained in:
@@ -99,8 +99,6 @@ public class LoginEndpoint {
|
||||
public ModelAndView login(HttpServletRequest request) {
|
||||
_logger.debug("LoginController /login.");
|
||||
|
||||
WebContext.printRequest(request);
|
||||
|
||||
boolean isAuthenticated= WebContext.isAuthenticated();
|
||||
|
||||
if(isAuthenticated){
|
||||
|
||||
@@ -61,7 +61,7 @@ public class Oauth20ApiPermissionAdapter implements AsyncHandlerInterceptor {
|
||||
@Override
|
||||
public boolean preHandle(HttpServletRequest request,HttpServletResponse response, Object handler) throws Exception {
|
||||
_logger.trace("Oauth20ApiPermissionAdapter preHandle");
|
||||
String authorization = request.getHeader(AuthorizationHeaderUtils.AUTHORIZATION_HEADERNAME);
|
||||
String authorization = request.getHeader(AuthorizationHeaderUtils.HEADER_Authorization);
|
||||
|
||||
String accessToken = AuthorizationHeaderUtils.resolveBearer(authorization);
|
||||
OAuth2Authentication authentication = oauth20tokenServices.loadAuthentication(accessToken);
|
||||
|
||||
@@ -65,7 +65,7 @@ public class RestApiPermissionAdapter implements AsyncHandlerInterceptor {
|
||||
@Override
|
||||
public boolean preHandle(HttpServletRequest request,HttpServletResponse response, Object handler) throws Exception {
|
||||
_logger.trace("RestApiPermissionAdapter preHandle");
|
||||
String authorization = request.getHeader(AuthorizationHeaderUtils.AUTHORIZATION_HEADERNAME);
|
||||
String authorization = request.getHeader(AuthorizationHeaderUtils.HEADER_Authorization);
|
||||
AuthorizationHeaderCredential headerCredential = AuthorizationHeaderUtils.resolve(authorization);
|
||||
|
||||
//判断应用的AppId和Secret
|
||||
|
||||
Reference in New Issue
Block a user