REFINE OAuth2 user handling and update database schema
This commit is contained in:
@@ -6,7 +6,6 @@ import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.Map;
|
||||
|
||||
@RestController
|
||||
@@ -15,7 +14,7 @@ public class AuthController {
|
||||
|
||||
@GetMapping("/user")
|
||||
public Map<String, Object> user(@AuthenticationPrincipal OAuth2User principal) {
|
||||
return Collections.singletonMap("name", principal.getAttribute("name"));
|
||||
return principal.getAttributes();
|
||||
}
|
||||
|
||||
@GetMapping("/login")
|
||||
|
||||
Reference in New Issue
Block a user