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
public abstract class AbstractOAuth2UserEmailProvider extends NuxeoOAuth2ServiceProvider
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
Constructors Constructor Description AbstractOAuth2UserEmailProvider()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected 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
-
-
-
-
Method Detail
-
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
protected String getServiceUserId(String email)
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
protected abstract String getUserEmail(String accessToken) throws IOException
- Throws:
IOException
-
-