Interface AuthorizationCodeDataProvider
- All Superinterfaces:
OAuthDataProvider
- All Known Implementing Classes:
AbstractAuthorizationCodeDataProvider,AbstractCodeDataProvider,DefaultEncryptingCodeDataProvider,JCacheCodeDataProvider,JPACMTCodeDataProvider,JPACodeDataProvider
AuthorizationCodeDataProvider is the
OAuthDataProvider which
can additionally persist the authorization code grant information-
Method Summary
Modifier and TypeMethodDescriptionCreates a temporarily code grant which will capture the information about theClientrequesting the access to the resource owner's resourcesgetCodeGrants(Client client, UserSubject subject) Return the list of code grants associated with a given clientremoveCodeGrant(String code) Returns the previously registeredServerAuthorizationCodeGrantMethods inherited from interface org.apache.cxf.rs.security.oauth2.provider.OAuthDataProvider
convertScopeToPermissions, createAccessToken, getAccessToken, getAccessTokens, getClient, getPreauthorizedToken, getRefreshTokens, refreshAccessToken, revokeToken
-
Method Details
-
createCodeGrant
ServerAuthorizationCodeGrant createCodeGrant(AuthorizationCodeRegistration reg) throws OAuthServiceException Creates a temporarily code grant which will capture the information about theClientrequesting the access to the resource owner's resources- Parameters:
reg- information about the client code grant request- Returns:
- new code grant
- Throws:
OAuthServiceException- See Also:
-
removeCodeGrant
Returns the previously registeredServerAuthorizationCodeGrant- Parameters:
code- the code grant- Returns:
- the grant
- Throws:
OAuthServiceException- if no grant with this code is available- See Also:
-
getCodeGrants
List<ServerAuthorizationCodeGrant> getCodeGrants(Client client, UserSubject subject) throws OAuthServiceException Return the list of code grants associated with a given client- Parameters:
client- the clientsubject- the user subject, can be null- Returns:
- the list of grants
- Throws:
OAuthServiceException- See Also:
-