getCustomClaim -> getClaim. Also, removed outdated TODOs.

pull/419/merge
William Kim 2013-07-16 13:17:25 -04:00
parent 17a96ca122
commit f483d41b88
5 changed files with 3 additions and 11 deletions

View File

@ -403,8 +403,8 @@ public class OIDCAuthenticationFilter extends AbstractAuthenticationProcessingFi
} }
// compare the nonce to our stored claim // compare the nonce to our stored claim
// TODO: Nimbus claims as strings? // would be nice to have a getClaimAsString() kind of method from nimbus..
String nonce = (String) idClaims.getCustomClaim("nonce"); String nonce = (String) idClaims.getClaim("nonce");
if (Strings.isNullOrEmpty(nonce)) { if (Strings.isNullOrEmpty(nonce)) {
logger.error("ID token did not contain a nonce claim."); logger.error("ID token did not contain a nonce claim.");

View File

@ -45,12 +45,10 @@ public class JwtBearerClientAssertionTokenEndpointFilter extends ClientCredentia
public JwtBearerClientAssertionTokenEndpointFilter() { public JwtBearerClientAssertionTokenEndpointFilter() {
super(); super();
// TODO Auto-generated constructor stub
} }
public JwtBearerClientAssertionTokenEndpointFilter(String path) { public JwtBearerClientAssertionTokenEndpointFilter(String path) {
super(path); super(path);
// TODO Auto-generated constructor stub
} }
/** /**

View File

@ -194,7 +194,6 @@ public class ConnectTokenEnhancer implements TokenEnhancer {
idTokenEntity.setJwt(idToken); idTokenEntity.setJwt(idToken);
// TODO: might want to create a specialty authentication object here instead of copying
idTokenEntity.setAuthenticationHolder(token.getAuthenticationHolder()); idTokenEntity.setAuthenticationHolder(token.getAuthenticationHolder());
// create a scope set with just the special "id-token" scope // create a scope set with just the special "id-token" scope
@ -205,7 +204,6 @@ public class ConnectTokenEnhancer implements TokenEnhancer {
idTokenEntity.setClient(token.getClient()); idTokenEntity.setClient(token.getClient());
// attach the id token to the parent access token // attach the id token to the parent access token
// TODO: this relationship is one-to-one right now, this might change
token.setIdToken(idTokenEntity); token.setIdToken(idTokenEntity);
} }

View File

@ -121,7 +121,6 @@ public class TofuUserApprovalHandler implements UserApprovalHandler {
public AuthorizationRequest updateBeforeApproval(AuthorizationRequest authorizationRequest, Authentication userAuthentication) { public AuthorizationRequest updateBeforeApproval(AuthorizationRequest authorizationRequest, Authentication userAuthentication) {
//First, check database to see if the user identified by the userAuthentication has stored an approval decision //First, check database to see if the user identified by the userAuthentication has stored an approval decision
//getName may not be filled in? TODO: investigate
String userId = userAuthentication.getName(); String userId = userAuthentication.getName();
String clientId = authorizationRequest.getClientId(); String clientId = authorizationRequest.getClientId();
ClientDetails client = clientDetailsService.loadClientByClientId(clientId); ClientDetails client = clientDetailsService.loadClientByClientId(clientId);
@ -199,7 +198,6 @@ public class TofuUserApprovalHandler implements UserApprovalHandler {
} }
// inject the user-allowed scopes into the auth request // inject the user-allowed scopes into the auth request
// TODO: for the moment this allows both upscoping and downscoping.
ar.setScope(allowedScopes); ar.setScope(allowedScopes);
//Only store an ApprovedSite if the user has checked "remember this decision": //Only store an ApprovedSite if the user has checked "remember this decision":
@ -217,8 +215,6 @@ public class TofuUserApprovalHandler implements UserApprovalHandler {
approvedSiteService.createApprovedSite(clientId, userId, timeout, allowedScopes, null); approvedSiteService.createApprovedSite(clientId, userId, timeout, allowedScopes, null);
} }
// TODO: should we set approved here? It gets called later via the isApproved method in this class...
return ar; return ar;
} }

View File

@ -65,7 +65,7 @@ public class ManagerController {
return "contact"; return "contact";
} }
@PreAuthorize("hasRole('ROLE_USER')") // TODO: this probably shouldn't be here @PreAuthorize("hasRole('ROLE_USER')")
@RequestMapping("manage/**") @RequestMapping("manage/**")
public String showClientManager(ModelMap m) { public String showClientManager(ModelMap m) {
return "manage"; return "manage";