Package org.forgerock.openam.oauth2
Class IdentityManager
- java.lang.Object
-
- org.forgerock.openam.oauth2.IdentityManager
-
@Singleton public class IdentityManager extends Object
Allows a client and resource owner's identity to be retrieved.- Since:
- 12.0.0
-
-
Constructor Summary
Constructors Constructor Description IdentityManager(OAuth2ProviderSettingsFactory providerSettingsFactory)Constructs a new IdentityManager.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AMIdentitygetClientIdentity(String clientName, String realm)Gets a client's identity.AMIdentitygetResourceOwnerIdentity(String username, String realm)Gets a resource owner's identity.
-
-
-
Constructor Detail
-
IdentityManager
@Inject public IdentityManager(OAuth2ProviderSettingsFactory providerSettingsFactory)
Constructs a new IdentityManager.- Parameters:
providerSettingsFactory- An instance of the OAuth2ProviderSettingsFactory.
-
-
Method Detail
-
getResourceOwnerIdentity
public AMIdentity getResourceOwnerIdentity(String username, String realm) throws UnauthorizedClientException
Gets a resource owner's identity.- Parameters:
username- The resource owner's username.realm- The resource owner's realm.- Returns:
- The resource owner's identity.
- Throws:
UnauthorizedClientException- If the resource owner's identity cannot be found.
-
getClientIdentity
public AMIdentity getClientIdentity(String clientName, String realm) throws UnauthorizedClientException
Gets a client's identity.- Parameters:
clientName- The client's name.realm- The client's realm.- Returns:
- The Clients identity.
- Throws:
UnauthorizedClientException- If the client's identity cannot be found.
-
-