public class JPACodeDataProvider extends JPAOAuthDataProvider implements AuthorizationCodeDataProvider
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) |
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) |
ServerAuthorizationCodeGrant |
removeCodeGrant(String code)
Returns the previously registered
ServerAuthorizationCodeGrant |
protected void |
saveCodeGrant(ServerAuthorizationCodeGrant grant) |
void |
setCodeLifetime(long codeLifetime) |
close, doRemoveClient, doRevokeAccessToken, doRevokeRefreshToken, getAccessToken, getAccessTokens, getClient, getClients, getClientsQuery, getEntityManager, getRefreshToken, getRefreshTokens, getRefreshTokensQuery, getTokensQuery, persistEntity, removeEntity, saveAccessToken, saveRefreshToken, setClient, setEntityManager
convertScopeToPermissions, createAccessToken, createNewAccessToken, createNewRefreshToken, doCreateAccessToken, doCreateNewRefreshToken, doRefreshAccessToken, getDefaultScopes, getInvisibleToClientScopes, getMessageContext, getPermissionMap, getPreauthorizedToken, getRequiredScopes, handleLinkedRefreshToken, init, isClientMatched, isRefreshTokenSupported, isSupportPreauthorizedTokens, isTokenMatched, linkAccessTokenToRefreshToken, linkRefreshTokenToAccessToken, refreshAccessToken, removeAccessToken, removeClient, removeClientTokens, revokeAccessToken, revokeAccessTokens, revokeRefreshToken, revokeToken, setAccessTokenLifetime, setClients, setDefaultScopes, setInvisibleToClientScopes, setMessageContext, setPermissionMap, setRecycleRefreshTokens, setRefreshTokenLifetime, setRequiredScopes, setSupportedScopes, setSupportPreauthorizedTokens, unlinkRefreshAccessToken, updateRefreshToken
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
convertScopeToPermissions, createAccessToken, getAccessToken, getAccessTokens, getClient, getPreauthorizedToken, getRefreshTokens, refreshAccessToken, removeAccessToken, 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)
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
subject
- the user subject, can be nullOAuthServiceException
ServerAuthorizationCodeGrant
public void setCodeLifetime(long codeLifetime)
protected javax.persistence.TypedQuery<ServerAuthorizationCodeGrant> getCodesQuery(Client c, UserSubject resourceOwnerSubject)
Apache CXF