Class AbstractOAuth2UserEmailProvider
java.lang.Object
org.nuxeo.ecm.platform.oauth2.providers.NuxeoOAuth2ServiceProvider
org.nuxeo.ecm.platform.oauth2.providers.AbstractOAuth2UserEmailProvider
- All Implemented Interfaces:
OAuth2ServiceProvider
- Direct Known Subclasses:
AbstractLiveConnectOAuth2ServiceProvider
OAuth2ServiceProvider
that relies on the user's email as key.- Since:
- 7.3
-
Field Summary
Fields inherited from class org.nuxeo.ecm.platform.oauth2.providers.NuxeoOAuth2ServiceProvider
CODE_URL_PARAMETER, description, ERROR_URL_PARAMETER, HTTP_TRANSPORT, id, JSON_FACTORY, SCHEMA, serviceName, serviceUserStore, tokenStore, userAuthorizationURL
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected String
getOrCreateServiceUser
(javax.servlet.http.HttpServletRequest request, String accessToken) Retrieves or creates a service user.protected String
getServiceUserId
(String email) Returns the userId to use for token entries.protected abstract String
getUserEmail
(String accessToken) Methods inherited from class org.nuxeo.ecm.platform.oauth2.providers.NuxeoOAuth2ServiceProvider
getAuthorizationCode, getAuthorizationCodeFlow, getAuthorizationServerURL, getAuthorizationUrl, getAuthorizationUrl, getCallbackUrl, getCallbackUrl, getClientId, getClientSecret, getCredentialDataStore, getDescription, getError, getId, getScopes, getServiceName, getServiceUserStore, getTokenServerURL, getUserAuthorizationURL, handleAuthorizationCallback, isEnabled, isProviderAvailable, loadCredential, setAuthorizationServerURL, setClientId, setClientSecret, setDescription, setEnabled, setId, setScopes, setServiceName, setTokenServerURL, setUserAuthorizationURL
-
Constructor Details
-
AbstractOAuth2UserEmailProvider
public AbstractOAuth2UserEmailProvider()
-
-
Method Details
-
getOrCreateServiceUser
protected String getOrCreateServiceUser(javax.servlet.http.HttpServletRequest request, String accessToken) throws IOException Description copied from class:NuxeoOAuth2ServiceProvider
Retrieves or creates a service user. Should be overriden by subclasses wanting to rely on a different field as key.- Overrides:
getOrCreateServiceUser
in classNuxeoOAuth2ServiceProvider
- Throws:
IOException
-
getServiceUserId
Description copied from class:NuxeoOAuth2ServiceProvider
Returns the userId to use for token entries. Should be overriden by subclasses wanting to rely on a different field as key.- Overrides:
getServiceUserId
in classNuxeoOAuth2ServiceProvider
-
getUserEmail
- Throws:
IOException
-