public class JPACodeDataProvider extends JPAOAuthDataProvider implements AuthorizationCodeDataProvider
JPAOAuthDataProvider.EntityManagerOperation<T>| Constructor and Description |
|---|
JPACodeDataProvider() |
| Modifier and Type | Method and Description |
|---|---|
ServerAuthorizationCodeGrant |
createCodeGrant(AuthorizationCodeRegistration reg)
Creates a temporarily code grant which will capture the
information about the
Client requesting the access to
the resource owner's resources |
protected ServerAuthorizationCodeGrant |
doCreateCodeGrant(AuthorizationCodeRegistration reg) |
protected void |
doRemoveClient(Client c) |
List<ServerAuthorizationCodeGrant> |
getCodeGrants(Client c,
UserSubject subject)
Return the list of code grants associated with a given client
|
protected javax.persistence.TypedQuery<ServerAuthorizationCodeGrant> |
getCodesQuery(Client c,
UserSubject resourceOwnerSubject,
javax.persistence.EntityManager em) |
protected void |
removeClientCodeGrants(Client c) |
protected void |
removeClientCodeGrants(Client c,
javax.persistence.EntityManager em) |
ServerAuthorizationCodeGrant |
removeCodeGrant(String code)
Returns the previously registered
ServerAuthorizationCodeGrant |
protected void |
saveCodeGrant(ServerAuthorizationCodeGrant grant) |
void |
setCodeLifetime(long codeLifetime) |
beginIfNeeded, closeIfNeeded, commitIfNeeded, doCreateAccessToken, doGetClient, doRevokeAccessToken, doRevokeRefreshToken, execute, executeInTransaction, flushIfNeeded, getAccessToken, getAccessTokens, getClients, getClientsQuery, getEntityManager, getRefreshToken, getRefreshTokens, getRefreshTokensQuery, getTokensQuery, linkRefreshTokenToAccessToken, persistEntity, removeEntity, saveAccessToken, saveRefreshToken, setClient, setEntityManagerFactoryauthenticateUnregisteredClient, checkRequestedScopes, close, convertScopeToPermissions, convertSingleScopeToPermission, createAccessToken, createClientCredentialsClient, createJwtAccessToken, createNewAccessToken, createNewRefreshToken, doCreateNewRefreshToken, doRefreshAccessToken, getClient, getCurrentClientSecret, getCurrentRequestedGrantType, getCurrentTokenRequestParams, getDefaultScopes, getInvisibleToClientScopes, getJwtAccessTokenClaimMap, getJwtAccessTokenProducer, getMessageContext, getPermissionMap, getPreauthorizedToken, getRequiredScopes, handleLinkedRefreshToken, init, isClientMatched, isRecycleRefreshTokens, isRefreshTokenSupported, isSupportPreauthorizedTokens, isTokenMatched, isUseJwtFormatForAccessTokens, linkAccessTokenToRefreshToken, processJwtAccessToken, refreshAccessToken, removeClient, removeClientTokens, revokeAccessToken, revokeAccessTokens, revokeRefreshToken, revokeToken, setAccessTokenLifetime, setAuthenticationStrategy, setClients, setDefaultScopes, setInvisibleToClientScopes, setJwtAccessTokenClaimMap, setJwtAccessTokenProducer, setMessageContext, setPermissionMap, setRecycleRefreshTokens, setRefreshTokenLifetime, setRequiredScopes, setSupportedScopes, setSupportPreauthorizedTokens, setUseJwtFormatForAccessTokens, unlinkRefreshAccessToken, updateExistingRefreshToken, updateRefreshTokenclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitconvertScopeToPermissions, createAccessToken, getAccessToken, getAccessTokens, getClient, getPreauthorizedToken, getRefreshTokens, refreshAccessToken, revokeTokenpublic ServerAuthorizationCodeGrant createCodeGrant(AuthorizationCodeRegistration reg) throws OAuthServiceException
AuthorizationCodeDataProviderClient requesting the access to
the resource owner's resourcescreateCodeGrant in interface AuthorizationCodeDataProviderreg - information about the client code grant requestOAuthServiceExceptionAuthorizationCodeRegistration,
ServerAuthorizationCodeGrantprotected ServerAuthorizationCodeGrant doCreateCodeGrant(AuthorizationCodeRegistration reg) throws OAuthServiceException
OAuthServiceExceptionprotected void saveCodeGrant(ServerAuthorizationCodeGrant grant)
protected void doRemoveClient(Client c)
doRemoveClient in class JPAOAuthDataProviderprotected void removeClientCodeGrants(Client c)
protected void removeClientCodeGrants(Client c, javax.persistence.EntityManager em)
public ServerAuthorizationCodeGrant removeCodeGrant(String code) throws OAuthServiceException
AuthorizationCodeDataProviderServerAuthorizationCodeGrantremoveCodeGrant in interface AuthorizationCodeDataProvidercode - the code grantOAuthServiceException - if no grant with this code is availableServerAuthorizationCodeGrantpublic List<ServerAuthorizationCodeGrant> getCodeGrants(Client c, UserSubject subject) throws OAuthServiceException
AuthorizationCodeDataProvidergetCodeGrants in interface AuthorizationCodeDataProvidersubject - the user subject, can be nullOAuthServiceExceptionServerAuthorizationCodeGrantpublic void setCodeLifetime(long codeLifetime)
protected javax.persistence.TypedQuery<ServerAuthorizationCodeGrant> getCodesQuery(Client c, UserSubject resourceOwnerSubject, javax.persistence.EntityManager em)
Apache CXF