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, setEntityManagerconvertScopeToPermissions, 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, updateRefreshTokenclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitconvertScopeToPermissions, createAccessToken, getAccessToken, getAccessTokens, getClient, getPreauthorizedToken, getRefreshTokens, refreshAccessToken, removeAccessToken, 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)
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)
Apache CXF