Skip to content

Commit

Permalink
Removing comments
Browse files Browse the repository at this point in the history
  • Loading branch information
dankle committed Sep 25, 2023
1 parent 71a55ea commit f8283c4
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,12 @@ public AuthenticationToken createToken(ServletRequest request, ServletResponse r
return null;
}

//TODO: If token comes in from bearer token, then this should be an access_token.
// Use this directly to get the user profile i.e. ssoClient.getProfile(accessToken);

String login = jwtAuthenticator.validateTokenAndGetLogin(incomingToken);
if (login == null) {
return null;
}

String[] as = parseDomain(login); //TODO: Can we not get this info from userInfo endpoint? i.e. SsoClient.Profile
String[] as = parseDomain(login);

SsoClient.Profile profile;
try {
Expand All @@ -83,7 +80,6 @@ public AuthenticationToken createToken(ServletRequest request, ServletResponse r
if (profile == null) {
return null;
}
//TODO: User name and domain should be returned by the userInfo endpoint(profile) "sub". Do we really need these two? as[0], as[1]
return new SsoToken(as[0], as[1], profile.displayName(), profile.mail(), profile.userPrincipalName(), profile.nameInNamespace(), profile.groups());
}

Expand Down

0 comments on commit f8283c4

Please sign in to comment.