principal map modified
This commit is contained in:
@@ -1,4 +1,29 @@
|
|||||||
package io.bluemoon.authorizationserver.config.handler;
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -81,15 +81,14 @@ public class SsoController {
|
|||||||
return user;
|
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")
|
@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
|
@ResponseBody
|
||||||
public String test2() {
|
public String test2() {
|
||||||
return "kkk";
|
return "kkk";
|
||||||
|
|||||||
Reference in New Issue
Block a user