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
Fields inherited from class org.nuxeo.runtime.model.DefaultComponent
lastModified, name
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
checkPermission
(NuxeoPrincipal principal) protected List<NuxeoOAuth2Token>
findTokens
(QueryBuilder queryBuilder) protected List<NuxeoOAuth2Token>
findTokens
(QueryBuilder queryBuilder, NuxeoPrincipal principal) protected QueryBuilder
getQueryBuilder
(String query) protected QueryBuilder
getQueryBuilder
(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 givenquery
as 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, unregisterExtension
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:OAuth2TokenService
Gets the oAuth2 tokens as the given principal.- Specified by:
getTokens
in interfaceOAuth2TokenService
- Returns:
- the oAuth2 tokens
-
getTokens
Description copied from interface:OAuth2TokenService
Gets the OAuth2 tokens for the given user.- Specified by:
getTokens
in interfaceOAuth2TokenService
- Parameters:
nxuser
- the nuxeo user- Returns:
- the oAuth2 tokens that match the given user
-
getTokens
Description copied from interface:OAuth2TokenService
Gets the oAuth2 tokens for a given type as the given principal.- Specified by:
getTokens
in interfaceOAuth2TokenService
- Parameters:
type
- the token typeNuxeoOAuth2TokenType
- Returns:
- the oAuth2 tokens that match the type
-
getTokens
Description copied from interface:OAuth2TokenService
Gets the OAuth2 tokens from a given user name and a type.- Specified by:
getTokens
in interfaceOAuth2TokenService
- Parameters:
nxuser
- the nuxeo usertype
- the token typeNuxeoOAuth2TokenType
- Returns:
- the oAuth2 tokens
-
search
Description copied from interface:OAuth2TokenService
Finds the oAuth2 tokens that match the givenquery
as the given principal. To be retrieved a token should match thequery
anywhere in the string value of the fieldsNuxeoOAuth2Token.KEY_NUXEO_LOGIN
,NuxeoOAuth2Token.KEY_SERVICE_NAME
- Specified by:
search
in interfaceOAuth2TokenService
- Parameters:
query
- the query to match- Returns:
- the oAuth2 tokens that match the
query
-
findTokens
-
findTokens
-
checkPermission
-
getQueryBuilder
-
getQueryBuilder
-