Class OAuth2TokenServiceImpl
java.lang.Object
org.nuxeo.runtime.model.DefaultComponent
org.nuxeo.ecm.platform.oauth2.tokens.OAuth2TokenServiceImpl
- All Implemented Interfaces:
OAuth2TokenService,Adaptable,Component,Extensible,TimestampedService
The implementation that manages the oauth2 tokens in Nuxeo.
- Since:
- 11.1
-
Field Summary
FieldsFields inherited from class org.nuxeo.runtime.model.DefaultComponent
lastModified, name -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcheckPermission(NuxeoPrincipal principal) protected List<NuxeoOAuth2Token> findTokens(QueryBuilder queryBuilder) protected List<NuxeoOAuth2Token> findTokens(QueryBuilder queryBuilder, NuxeoPrincipal principal) Garbage collects expired tokens.protected QueryBuildergetQueryBuilder(String query) protected QueryBuildergetQueryBuilder(String nxuser, NuxeoOAuth2TokenType type) Gets the OAuth2 tokens for the given user.getTokens(String nxuser, NuxeoOAuth2TokenType type) Gets the OAuth2 tokens from a given user name and a type.getTokens(NuxeoPrincipal principal) Gets the oAuth2 tokens as the given principal.getTokens(NuxeoOAuth2TokenType type, NuxeoPrincipal principal) Gets the oAuth2 tokens for a given type as the given principal.search(String query, NuxeoPrincipal principal) Finds the oAuth2 tokens that match the givenqueryas the given principal.Methods inherited from class org.nuxeo.runtime.model.DefaultComponent
activate, addRuntimeMessage, addRuntimeMessage, deactivate, getAdapter, getDescriptor, getDescriptors, getLastModified, getRegistry, register, registerContribution, registerExtension, setLastModified, setModifiedNow, setName, start, stop, unregister, unregisterContribution, unregisterExtensionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.nuxeo.runtime.model.Component
getApplicationStartedOrder
-
Field Details
-
TOKEN_DIR
- See Also:
-
-
Constructor Details
-
OAuth2TokenServiceImpl
public OAuth2TokenServiceImpl()
-
-
Method Details
-
getTokens
Description copied from interface:OAuth2TokenServiceGets the oAuth2 tokens as the given principal.- Specified by:
getTokensin interfaceOAuth2TokenService- Returns:
- the oAuth2 tokens
-
getTokens
Description copied from interface:OAuth2TokenServiceGets the OAuth2 tokens for the given user.- Specified by:
getTokensin interfaceOAuth2TokenService- Parameters:
nxuser- the nuxeo user- Returns:
- the oAuth2 tokens that match the given user
-
getTokens
Description copied from interface:OAuth2TokenServiceGets the oAuth2 tokens for a given type as the given principal.- Specified by:
getTokensin interfaceOAuth2TokenService- Parameters:
type- the token typeNuxeoOAuth2TokenType- Returns:
- the oAuth2 tokens that match the type
-
getTokens
Description copied from interface:OAuth2TokenServiceGets the OAuth2 tokens from a given user name and a type.- Specified by:
getTokensin interfaceOAuth2TokenService- Parameters:
nxuser- the nuxeo usertype- the token typeNuxeoOAuth2TokenType- Returns:
- the oAuth2 tokens
-
search
Description copied from interface:OAuth2TokenServiceFinds the oAuth2 tokens that match the givenqueryas the given principal. To be retrieved a token should match thequeryanywhere in the string value of the fieldsNuxeoOAuth2Token.KEY_NUXEO_LOGIN,NuxeoOAuth2Token.KEY_SERVICE_NAME- Specified by:
searchin interfaceOAuth2TokenService- Parameters:
query- the query to match- Returns:
- the oAuth2 tokens that match the
query
-
garbageCollectExpiredTokens
Description copied from interface:OAuth2TokenServiceGarbage collects expired tokens.- Specified by:
garbageCollectExpiredTokensin interfaceOAuth2TokenService- Returns:
- the commandId
-
findTokens
-
findTokens
-
checkPermission
-
getQueryBuilder
-
getQueryBuilder
-