File tree Expand file tree Collapse file tree
src/main/java/com/okta/developer/jugtours/web Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -42,17 +42,6 @@ public ResponseEntity<?> getUser(Principal principal) {
4242 }
4343 }
4444
45- @ GetMapping ("/api/tokens" )
46- public ResponseEntity <Map <String , String >> getTokens () {
47- OAuth2RestTemplate oauth2RestTemplate = this .templateFactory .getUserInfoRestTemplate ();
48- String idToken = (String ) oauth2RestTemplate .getAccessToken ().getAdditionalInformation ().get ("id_token" );
49-
50- Map <String , String > tokens = new HashMap <>();
51- tokens .put ("access_token" , oauth2RestTemplate .getAccessToken ().getValue ());
52- tokens .put ("id_token" , idToken );
53- return ResponseEntity .ok (tokens );
54- }
55-
5645 @ PostMapping ("/api/logout" )
5746 public ResponseEntity <?> logout (HttpServletRequest request ) {
5847 // send logout URL to client so they can initiate logout - doesn't work from the server side
You can’t perform that action at this time.
0 commit comments