principal map modified

This commit is contained in:
liquidjoo
2019-05-27 17:30:19 +09:00
parent e6d04205e6
commit 3bcd036b82
2 changed files with 33 additions and 9 deletions

View File

@@ -1,4 +1,29 @@
package io.bluemoon.authorizationserver.config.handler;
public class CustomAuthEndpointsApprovalHandler {
import org.springframework.security.core.Authentication;
import org.springframework.security.oauth2.provider.AuthorizationRequest;
import org.springframework.security.oauth2.provider.approval.UserApprovalHandler;
import java.util.Map;
public class CustomAuthEndpointsApprovalHandler implements UserApprovalHandler {
@Override
public boolean isApproved(AuthorizationRequest authorizationRequest, Authentication userAuthentication) {
return false;
}
@Override
public AuthorizationRequest checkForPreApproval(AuthorizationRequest authorizationRequest, Authentication userAuthentication) {
return null;
}
@Override
public AuthorizationRequest updateAfterApproval(AuthorizationRequest authorizationRequest, Authentication userAuthentication) {
return null;
}
@Override
public Map<String, Object> getUserApprovalRequest(AuthorizationRequest authorizationRequest, Authentication userAuthentication) {
return null;
}
}

View File

@@ -81,15 +81,14 @@ public class SsoController {
return user;
}
// @GetMapping(value = "/login/success")
// @ResponseBody
// public String loginComplete(@SocialUser User user) {
// System.out.println(user);
// return "redirect:/mk-auth/login/user";
//// return "why not";
// }
@GetMapping(value = "/login/success")
public String loginComplete(@SocialUser User user) {
System.out.println(user);
return "redirect:https://924680a1.ngrok.io/login";
// return "why not";
}
@GetMapping(value = "/login/test")
@ResponseBody
public String test2() {
return "kkk";