Package org.forgerock.oauth2.core
Class ResourceOwnerSessionValidator
- java.lang.Object
-
- org.forgerock.oauth2.core.ResourceOwnerSessionValidator
-
@Singleton public class ResourceOwnerSessionValidator extends Object
Validates whether a resource owner has a current authenticated session.- Since:
- 12.0.0
-
-
Constructor Summary
Constructors Constructor Description ResourceOwnerSessionValidator(DNWrapper dnWrapper, SSOTokenManager ssoTokenManager, OAuth2ProviderSettingsFactory providerSettingsFactory, ClientDAO clientDAO, ClientCredentialsReader clientCredentialsReader)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SSOToken
getResourceOwnerSession(OAuth2Request request)
Gets the resource owner's session from the OAuth2 request.ResourceOwner
validate(OAuth2Request request)
Checks if the request contains valid resource owner session.
-
-
-
Constructor Detail
-
ResourceOwnerSessionValidator
@Inject public ResourceOwnerSessionValidator(DNWrapper dnWrapper, SSOTokenManager ssoTokenManager, OAuth2ProviderSettingsFactory providerSettingsFactory, ClientDAO clientDAO, ClientCredentialsReader clientCredentialsReader)
-
-
Method Detail
-
validate
public ResourceOwner validate(OAuth2Request request) throws ResourceOwnerAuthenticationRequired, AccessDeniedException, BadRequestException, InteractionRequiredException, LoginRequiredException, ServerException, NotFoundException
Checks if the request contains valid resource owner session.- Parameters:
request
- The OAuth2 request.- Returns:
- The ResourceOwner.
- Throws:
ResourceOwnerAuthenticationRequired
- If the resource owner needs to authenticate before the authorize request can be allowed.AccessDeniedException
- If resource owner authentication fails.BadRequestException
- If the request is malformed.InteractionRequiredException
- If the OpenID Connect prompt parameter enforces that the resource owner is not asked to authenticate, but the resource owner does not have a current authenticated session.LoginRequiredException
- If authenticating the resource owner fails.ServerException
- If the server is misconfigured.NotFoundException
- If the realm does not have an OAuth 2.0 provider service.
-
getResourceOwnerSession
public SSOToken getResourceOwnerSession(OAuth2Request request)
Gets the resource owner's session from the OAuth2 request.- Parameters:
request
- The OAuth2 request.- Returns:
- The resource owner's
SSOToken
.
-
-