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, setEntityManagerFactory
authenticateUnregisteredClient, checkRequestedScopes, close, convertScopeToPermissions, convertSingleScopeToPermission, createAccessToken, createClientCredentialsClient, createJwtAccessToken, createNewAccessToken, createNewRefreshToken, doCreateNewRefreshToken, doRefreshAccessToken, getClient, getCurrentClientSecret, getCurrentRequestedGrantType, getCurrentTokenRequestParams, getDefaultScopes, getInvisibleToClientScopes, getIssuer, getJwtAccessTokenClaimMap, getJwtAccessTokenProducer, getMessageContext, getPermissionMap, getPreauthorizedToken, getRequiredScopes, handleLinkedRefreshToken, init, isClientMatched, isPersistJwtEncoding, isRecycleRefreshTokens, isRefreshTokenSupported, isSupportPreauthorizedTokens, isTokenMatched, isUseJwtFormatForAccessTokens, linkAccessTokenToRefreshToken, processJwtAccessToken, refreshAccessToken, removeClient, removeClientTokens, revokeAccessToken, revokeAccessTokens, revokeRefreshToken, revokeToken, setAccessTokenLifetime, setAuthenticationStrategy, setClients, setDefaultScopes, setInvisibleToClientScopes, setIssuer, setJwtAccessTokenClaimMap, setJwtAccessTokenProducer, setMessageContext, setPermissionMap, setPersistJwtEncoding, setRecycleRefreshTokens, setRefreshTokenLifetime, setRequiredScopes, setSupportedScopes, setSupportPreauthorizedTokens, setUseJwtFormatForAccessTokens, unlinkRefreshAccessToken, updateExistingRefreshToken, updateRefreshToken
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
convertScopeToPermissions, createAccessToken, getAccessToken, getAccessTokens, getClient, getPreauthorizedToken, getRefreshTokens, refreshAccessToken, revokeToken
public ServerAuthorizationCodeGrant createCodeGrant(AuthorizationCodeRegistration reg) throws OAuthServiceException
AuthorizationCodeDataProvider
Client
requesting the access to
the resource owner's resourcescreateCodeGrant
in interface AuthorizationCodeDataProvider
reg
- information about the client code grant requestOAuthServiceException
AuthorizationCodeRegistration
,
ServerAuthorizationCodeGrant
protected ServerAuthorizationCodeGrant doCreateCodeGrant(AuthorizationCodeRegistration reg) throws OAuthServiceException
OAuthServiceException
protected void saveCodeGrant(ServerAuthorizationCodeGrant grant)
protected void doRemoveClient(Client c)
doRemoveClient
in class JPAOAuthDataProvider
protected void removeClientCodeGrants(Client c)
protected void removeClientCodeGrants(Client c, javax.persistence.EntityManager em)
public ServerAuthorizationCodeGrant removeCodeGrant(String code) throws OAuthServiceException
AuthorizationCodeDataProvider
ServerAuthorizationCodeGrant
removeCodeGrant
in interface AuthorizationCodeDataProvider
code
- the code grantOAuthServiceException
- if no grant with this code is availableServerAuthorizationCodeGrant
public List<ServerAuthorizationCodeGrant> getCodeGrants(Client c, UserSubject subject) throws OAuthServiceException
AuthorizationCodeDataProvider
getCodeGrants
in interface AuthorizationCodeDataProvider
c
- the clientsubject
- the user subject, can be nullOAuthServiceException
ServerAuthorizationCodeGrant
public void setCodeLifetime(long codeLifetime)
protected javax.persistence.TypedQuery<ServerAuthorizationCodeGrant> getCodesQuery(Client c, UserSubject resourceOwnerSubject, javax.persistence.EntityManager em)
Apache CXF