public class OAuthCMISAuthenticationProvider
extends org.apache.chemistry.opencmis.client.bindings.spi.AbstractAuthenticationProvider
| Modifier and Type | Class and Description |
|---|---|
static class |
OAuthCMISAuthenticationProvider.AccessToken |
| Modifier and Type | Field and Description |
|---|---|
static String |
ALFRESCO_ACCESS_TOKEN_URL |
static String |
ALFRESCO_REFRESH_TOKEN_URL |
static String |
PARAM_ACCESS_TOKEN |
| Constructor and Description |
|---|
OAuthCMISAuthenticationProvider() |
OAuthCMISAuthenticationProvider(String accessToken)
Authenticates with the Alfresco CMIS Public Api with a previously-generated access token (no refresh token support).
|
OAuthCMISAuthenticationProvider(String clientId,
String clientSecret,
String redirectUrl,
String accessTokenUrl,
String refreshTokenUrl,
String authCode)
Authenticates with the Alfresco CMIS Public Api by generating an access token to communicate with the public api.
|
| Modifier and Type | Method and Description |
|---|---|
static OAuthCMISAuthenticationProvider |
alfrescoOAuthProvider(String accessToken) |
static OAuthCMISAuthenticationProvider |
alfrescoOAuthProvider(String clientId,
String clientSecret,
String redirectUrl,
String authCode) |
protected List<String> |
createBasicAuthHeaderValue(String username,
String password)
Creates a basic authentication header value from a username and a
password.
|
OAuthCMISAuthenticationProvider.AccessToken |
getAccessTokenData() |
protected Map<String,List<String>> |
getFixedHeaders()
Returns the HTTP headers that are sent with all requests.
|
Map<String,List<String>> |
getHTTPHeaders(String url) |
Element |
getSOAPHeaders(Object portObject) |
protected boolean |
isTrue(String parameterName)
Returns
true if the given parameter exists in the session
and is set to true, false otherwise. |
void |
putResponseHeaders(String url,
int statusCode,
Map<String,List<String>> headers) |
void |
setSession(org.apache.chemistry.opencmis.client.bindings.spi.BindingSession session) |
public static final String ALFRESCO_ACCESS_TOKEN_URL
public static final String ALFRESCO_REFRESH_TOKEN_URL
public static final String PARAM_ACCESS_TOKEN
public OAuthCMISAuthenticationProvider()
public OAuthCMISAuthenticationProvider(String accessToken)
accessToken - public OAuthCMISAuthenticationProvider(String clientId, String clientSecret, String redirectUrl, String accessTokenUrl, String refreshTokenUrl, String authCode)
accessToken - public static OAuthCMISAuthenticationProvider alfrescoOAuthProvider(String accessToken)
public static OAuthCMISAuthenticationProvider alfrescoOAuthProvider(String clientId, String clientSecret, String redirectUrl, String authCode)
public OAuthCMISAuthenticationProvider.AccessToken getAccessTokenData()
public void setSession(org.apache.chemistry.opencmis.client.bindings.spi.BindingSession session)
setSession in interface org.apache.chemistry.opencmis.client.bindings.spi.SessionAwareAuthenticationProvidersetSession in class org.apache.chemistry.opencmis.client.bindings.spi.AbstractAuthenticationProviderpublic Map<String,List<String>> getHTTPHeaders(String url)
getHTTPHeaders in interface org.apache.chemistry.opencmis.commons.spi.AuthenticationProvidergetHTTPHeaders in class org.apache.chemistry.opencmis.client.bindings.spi.AbstractAuthenticationProviderpublic void putResponseHeaders(String url, int statusCode, Map<String,List<String>> headers)
putResponseHeaders in interface org.apache.chemistry.opencmis.commons.spi.AuthenticationProviderputResponseHeaders in class org.apache.chemistry.opencmis.client.bindings.spi.AbstractAuthenticationProviderpublic Element getSOAPHeaders(Object portObject)
getSOAPHeaders in interface org.apache.chemistry.opencmis.commons.spi.AuthenticationProvidergetSOAPHeaders in class org.apache.chemistry.opencmis.client.bindings.spi.AbstractAuthenticationProviderprotected Map<String,List<String>> getFixedHeaders()
protected List<String> createBasicAuthHeaderValue(String username, String password)
protected boolean isTrue(String parameterName)
true if the given parameter exists in the session
and is set to true, false otherwise.Copyright © 2011–2014 Alfresco. All rights reserved.