public class OAuthIdentityStore extends Object implements javax.security.enterprise.identitystore.IdentityStore
This identity store validates a RememberMeCredential and presumes that the the token passes to the
credential upon creation is a valid one and does no further validation. If further validation is required
then it may be useful to send a JAX-RS request to the OAuth provider.
If an fish.payara.security.oauth2.annotation.OAuth2AuthenticationDefinition is declared and their are
no other IdentityStore definitions implemented then this will be used as a fall-back.
If other IdentityStore definitions are available but none validate RememberMeCredential then
CredentialValidationResult.NOT_VALIDATED_RESULT will be returned to the authentication mechanism.
| Constructor and Description |
|---|
OAuthIdentityStore() |
| Modifier and Type | Method and Description |
|---|---|
int |
priority() |
javax.security.enterprise.identitystore.CredentialValidationResult |
validate(javax.security.enterprise.credential.RememberMeCredential credential)
Returns a valid
CredentialValidationResult. |
Set<javax.security.enterprise.identitystore.IdentityStore.ValidationType> |
validationTypes() |
public javax.security.enterprise.identitystore.CredentialValidationResult validate(javax.security.enterprise.credential.RememberMeCredential credential)
CredentialValidationResult.
If further validation is required this method should be overridden in a sub-class
or alternative IdentityStore. Calling RememberMeCredential.getToken()
on the credential passed in will get the authorisation token which can be used to get
more information about the user from the OAuth provider by sending a GET request to
an endpoint i.e. https://oauthprovider/user&token=exampletoken.
credential - public int priority()
priority in interface javax.security.enterprise.identitystore.IdentityStorepublic Set<javax.security.enterprise.identitystore.IdentityStore.ValidationType> validationTypes()
validationTypes in interface javax.security.enterprise.identitystore.IdentityStoreCopyright © 2019. All rights reserved.