public class NuxeoOAuth2ServiceProvider extends Object implements OAuth2ServiceProvider
Modifier and Type | Field and Description |
---|---|
static String |
CODE_URL_PARAMETER |
static String |
ERROR_URL_PARAMETER |
static String |
SCHEMA |
Constructor and Description |
---|
NuxeoOAuth2ServiceProvider() |
Modifier and Type | Method and Description |
---|---|
com.google.api.client.auth.oauth2.AuthorizationCodeFlow |
getAuthorizationCodeFlow() |
String |
getAuthorizationServerURL() |
String |
getAuthorizationUrl(javax.servlet.http.HttpServletRequest request)
Returns the authorization URL
|
String |
getClientId() |
String |
getClientSecret() |
OAuth2TokenStore |
getCredentialDataStore() |
Long |
getId() |
List<String> |
getScopes() |
String |
getServiceName() |
String |
getTokenServerURL() |
com.google.api.client.auth.oauth2.Credential |
handleAuthorizationCallback(javax.servlet.http.HttpServletRequest request)
Handles the authorization response and stores the token(s)
|
boolean |
isEnabled() |
com.google.api.client.auth.oauth2.Credential |
loadCredential(String user)
Load a credential from the token store with the userId returned by getServiceUser() as key.
|
void |
setAuthorizationServerURL(String authorizationServerURL) |
void |
setClientId(String clientId) |
void |
setClientSecret(String clientSecret) |
void |
setEnabled(Boolean enabled) |
void |
setId(Long id) |
void |
setScopes(String... scopes) |
void |
setServiceName(String serviceName) |
void |
setTokenServerURL(String tokenServerURL) |
public static final String SCHEMA
public static final String CODE_URL_PARAMETER
public static final String ERROR_URL_PARAMETER
public String getAuthorizationUrl(javax.servlet.http.HttpServletRequest request)
OAuth2ServiceProvider
getAuthorizationUrl
in interface OAuth2ServiceProvider
public com.google.api.client.auth.oauth2.Credential handleAuthorizationCallback(javax.servlet.http.HttpServletRequest request) throws ClientException
OAuth2ServiceProvider
handleAuthorizationCallback
in interface OAuth2ServiceProvider
ClientException
public com.google.api.client.auth.oauth2.Credential loadCredential(String user)
loadCredential
in interface OAuth2ServiceProvider
public com.google.api.client.auth.oauth2.AuthorizationCodeFlow getAuthorizationCodeFlow()
public OAuth2TokenStore getCredentialDataStore()
public String getServiceName()
getServiceName
in interface OAuth2ServiceProvider
public Long getId()
getId
in interface OAuth2ServiceProvider
public String getTokenServerURL()
getTokenServerURL
in interface OAuth2ServiceProvider
public String getClientId()
getClientId
in interface OAuth2ServiceProvider
public String getClientSecret()
getClientSecret
in interface OAuth2ServiceProvider
public List<String> getScopes()
getScopes
in interface OAuth2ServiceProvider
public String getAuthorizationServerURL()
getAuthorizationServerURL
in interface OAuth2ServiceProvider
public boolean isEnabled()
isEnabled
in interface OAuth2ServiceProvider
public void setEnabled(Boolean enabled)
setEnabled
in interface OAuth2ServiceProvider
public void setServiceName(String serviceName)
setServiceName
in interface OAuth2ServiceProvider
public void setId(Long id)
setId
in interface OAuth2ServiceProvider
public void setTokenServerURL(String tokenServerURL)
setTokenServerURL
in interface OAuth2ServiceProvider
public void setAuthorizationServerURL(String authorizationServerURL)
setAuthorizationServerURL
in interface OAuth2ServiceProvider
public void setClientId(String clientId)
setClientId
in interface OAuth2ServiceProvider
public void setClientSecret(String clientSecret)
setClientSecret
in interface OAuth2ServiceProvider
public void setScopes(String... scopes)
setScopes
in interface OAuth2ServiceProvider
Copyright © 2015 Nuxeo SA. All rights reserved.