Class DefaultEncryptingCodeDataProvider
java.lang.Object
org.apache.cxf.rs.security.oauth2.provider.AbstractOAuthDataProvider
org.apache.cxf.rs.security.oauth2.provider.DefaultEncryptingOAuthDataProvider
org.apache.cxf.rs.security.oauth2.grants.code.DefaultEncryptingCodeDataProvider
- All Implemented Interfaces:
AuthorizationCodeDataProvider,ClientRegistrationProvider,OAuthDataProvider
public class DefaultEncryptingCodeDataProvider
extends DefaultEncryptingOAuthDataProvider
implements AuthorizationCodeDataProvider
-
Field Summary
Fields inherited from class org.apache.cxf.rs.security.oauth2.provider.DefaultEncryptingOAuthDataProvider
key -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreates a temporarily code grant which will capture the information about theClientrequesting the access to the resource owner's resourcesprotected ServerAuthorizationCodeGrantprotected StringgetCodeGrant(String code) getCodeGrants(Client c, UserSubject sub) Return the list of code grants associated with a given clientlongprotected longremoveClient(String clientId) Remove a Client with the given idprotected voidremoveCodeGrant(String code) Returns the previously registeredServerAuthorizationCodeGrantprotected voidvoidsetGrantLifetime(long lifetime) Methods inherited from class org.apache.cxf.rs.security.oauth2.provider.DefaultEncryptingOAuthDataProvider
doGetClient, doRemoveClient, doRevokeAccessToken, doRevokeRefreshToken, getAccessToken, getAccessTokens, getClients, getRefreshToken, getRefreshTokens, saveAccessToken, saveRefreshToken, setClientMethods inherited from class org.apache.cxf.rs.security.oauth2.provider.AbstractOAuthDataProvider
authenticateUnregisteredClient, checkRequestedScopes, close, convertScopeToPermissions, convertSingleScopeToPermission, convertToJWTAccessToken, createAccessToken, createClientCredentialsClient, createJwtAccessToken, createNewAccessToken, createNewRefreshToken, doCreateAccessToken, doCreateAccessToken, 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, linkRefreshTokenToAccessToken, processJwtAccessToken, refreshAccessToken, removeClientTokens, revokeAccessToken, revokeAccessTokens, revokeRefreshToken, revokeToken, setAccessTokenLifetime, setAuthenticationStrategy, setClients, setDefaultScopes, setInvisibleToClientScopes, setIssuer, setJwtAccessTokenClaimMap, setJwtAccessTokenProducer, setMessageContext, setPermissionMap, setPersistJwtEncoding, setRecycleRefreshTokens, setRefreshTokenLifetime, setRequiredScopes, setSupportedScopes, setSupportPreauthorizedTokens, setUseJwtFormatForAccessTokens, unlinkRefreshAccessToken, updateExistingRefreshToken, updateRefreshTokenMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.cxf.rs.security.oauth2.provider.OAuthDataProvider
convertScopeToPermissions, createAccessToken, getAccessToken, getAccessTokens, getClient, getPreauthorizedToken, getRefreshTokens, refreshAccessToken, revokeToken
-
Constructor Details
-
DefaultEncryptingCodeDataProvider
-
DefaultEncryptingCodeDataProvider
-
DefaultEncryptingCodeDataProvider
-
-
Method Details
-
removeClient
Description copied from interface:ClientRegistrationProviderRemove a Client with the given id- Specified by:
removeClientin interfaceClientRegistrationProvider- Overrides:
removeClientin classAbstractOAuthDataProvider- Parameters:
clientId- the client id- Returns:
- Client
-
removeClientCodeGrants
-
createCodeGrant
public ServerAuthorizationCodeGrant createCodeGrant(AuthorizationCodeRegistration reg) throws OAuthServiceException Description copied from interface:AuthorizationCodeDataProviderCreates a temporarily code grant which will capture the information about theClientrequesting the access to the resource owner's resources- Specified by:
createCodeGrantin interfaceAuthorizationCodeDataProvider- Parameters:
reg- information about the client code grant request- Returns:
- new code grant
- Throws:
OAuthServiceException- See Also:
-
getCodeGrants
Description copied from interface:AuthorizationCodeDataProviderReturn the list of code grants associated with a given client- Specified by:
getCodeGrantsin interfaceAuthorizationCodeDataProvider- Parameters:
c- the clientsub- the user subject, can be null- Returns:
- the list of grants
- See Also:
-
removeCodeGrant
Description copied from interface:AuthorizationCodeDataProviderReturns the previously registeredServerAuthorizationCodeGrant- Specified by:
removeCodeGrantin interfaceAuthorizationCodeDataProvider- Parameters:
code- the code grant- Returns:
- the grant
- Throws:
OAuthServiceException- if no grant with this code is available- See Also:
-
getCodeGrant
- Throws:
OAuthServiceException
-
doCreateCodeGrant
protected ServerAuthorizationCodeGrant doCreateCodeGrant(AuthorizationCodeRegistration reg) throws OAuthServiceException - Throws:
OAuthServiceException
-
getApprovedScopes
-
getCode
-
getGrantLifetime
public long getGrantLifetime() -
setGrantLifetime
public void setGrantLifetime(long lifetime) -
getIssuedAt
protected long getIssuedAt() -
saveAuthorizationGrant
-