Skip to content

Commit

Permalink
Add username as the default subject ID
Browse files Browse the repository at this point in the history
  • Loading branch information
Akila94 committed Feb 6, 2025
1 parent c07baf4 commit fd44e12
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,6 @@
public class OBKeyManagerConstants {

public static final String CUSTOM_KEYMANAGER_TYPE = "ObKeyManager";
public static final String USE_USER_ID_FOR_DEFAULT_SUBJECT = "useUserIdForDefaultSubject";

}
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,8 @@ public OAuthApplicationInfo createApplication(OAuthAppRequest oauthAppRequest) t
// Adding SP property to identify create request. Will be removed when setting up authenticators.
additionalProperties.put("AppCreateRequest", "true");
}
// This SP property makes the username the default subject identifier.
additionalProperties.put(OBKeyManagerConstants.USE_USER_ID_FOR_DEFAULT_SUBJECT, "false");
doPreCreateApplication(oauthAppRequest, additionalProperties);
OAuthApplicationInfo oAuthApplicationInfo = oauthAppRequest.getOAuthApplicationInfo();
String username = (String) oAuthApplicationInfo.getParameter(ApplicationConstants.OAUTH_CLIENT_USERNAME);
Expand Down

0 comments on commit fd44e12

Please sign in to comment.