Interface AuthorizationCodeDataProvider
-
- All Superinterfaces:
OAuthDataProvider
- All Known Implementing Classes:
AbstractAuthorizationCodeDataProvider,AbstractCodeDataProvider,DefaultEncryptingCodeDataProvider,JCacheCodeDataProvider,JPACMTCodeDataProvider,JPACodeDataProvider
public interface AuthorizationCodeDataProvider extends OAuthDataProvider
AuthorizationCodeDataProvider is theOAuthDataProviderwhich can additionally persist the authorization code grant information
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ServerAuthorizationCodeGrantcreateCodeGrant(AuthorizationCodeRegistration reg)Creates a temporarily code grant which will capture the information about theClientrequesting the access to the resource owner's resourcesList<ServerAuthorizationCodeGrant>getCodeGrants(Client client, UserSubject subject)Return the list of code grants associated with a given clientServerAuthorizationCodeGrantremoveCodeGrant(String code)Returns the previously registeredServerAuthorizationCodeGrant-
Methods inherited from interface org.apache.cxf.rs.security.oauth2.provider.OAuthDataProvider
convertScopeToPermissions, createAccessToken, getAccessToken, getAccessTokens, getClient, getPreauthorizedToken, getRefreshTokens, refreshAccessToken, revokeToken
-
-
-
-
Method Detail
-
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:
AuthorizationCodeRegistration,ServerAuthorizationCodeGrant
-
removeCodeGrant
ServerAuthorizationCodeGrant removeCodeGrant(String code) throws OAuthServiceException
Returns the previously registeredServerAuthorizationCodeGrant- Parameters:
code- the code grant- Returns:
- the grant
- Throws:
OAuthServiceException- if no grant with this code is available- See Also:
ServerAuthorizationCodeGrant
-
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:
ServerAuthorizationCodeGrant
-
-