Package com.docusign.esign.client.auth
Class OAuth
- java.lang.Object
-
- com.docusign.esign.client.auth.OAuth
-
- All Implemented Interfaces:
Authentication
public class OAuth extends java.lang.Object implements Authentication
OAuth class.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classOAuth.AccountAccount model with the below properties.static classOAuth.LinkLink model with the below properties.static classOAuth.OAuthTokenOAuthToken model with the following properties.static classOAuth.OrganizationOrganization model with the below properties.static classOAuth.UserInfoUserInfo model with the below properties.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCODEused by public/native client applications.static java.lang.StringDEMO_OAUTH_BASEPATHsandbox/demo base path.static java.lang.StringGRANT_TYPE_JWTJWT grant type.static java.lang.StringPRODUCTION_OAUTH_BASEPATHlive/production base path.static java.lang.StringScope_EXTENDEDobtain a refresh token with an extended lifetime.static java.lang.StringScope_IMPERSONATIONobtain access to the user’s account when the user is not present.static java.lang.StringScope_SIGNATUREcreate and send envelopes, and obtain links for starting signing sessions.static java.lang.StringSTAGE_OAUTH_BASEPATHstage base path.static java.lang.StringTOKENused by private/trusted client application.
-
Constructor Summary
Constructors Constructor Description OAuth()OAuth constructor.OAuth(OAuthFlow flow, java.lang.String authorizationUrl, java.lang.String tokenUrl, java.lang.String scopes)OAuth constructor.OAuth(javax.ws.rs.client.Client client, OAuthFlow flow, java.lang.String authorizationUrl, java.lang.String tokenUrl, java.lang.String scopes)OAuth constructor.OAuth(javax.ws.rs.client.Client client, org.apache.oltu.oauth2.client.request.OAuthClientRequest.TokenRequestBuilder tokenRequestBuilder, org.apache.oltu.oauth2.client.request.OAuthClientRequest.AuthenticationRequestBuilder authenticationRequestBuilder)OAuth constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidapplyToParams(java.util.List<Pair> queryParams, java.util.Map<java.lang.String,java.lang.String> headerParams)applyToParams method.java.lang.StringgetAccessToken()getAccessToken method.org.apache.oltu.oauth2.client.request.OAuthClientRequest.AuthenticationRequestBuildergetAuthenticationRequestBuilder()org.apache.oltu.oauth2.client.OAuthClientgetOauthClient()org.apache.oltu.oauth2.client.request.OAuthClientRequest.TokenRequestBuildergetTokenRequestBuilder()voidregisterAccessTokenListener(AccessTokenListener accessTokenListener)registerAccessTokenListener method.voidsetAccessToken(java.lang.String accessToken, java.lang.Long expiresIn)voidsetAuthenticationRequestBuilder(org.apache.oltu.oauth2.client.request.OAuthClientRequest.AuthenticationRequestBuilder authenticationRequestBuilder)voidsetOauthClient(javax.ws.rs.client.Client client)voidsetOauthClient(org.apache.oltu.oauth2.client.OAuthClient oauthClient)voidsetTokenRequestBuilder(org.apache.oltu.oauth2.client.request.OAuthClientRequest.TokenRequestBuilder tokenRequestBuilder)voidupdateAccessToken()updateAccessToken method.
-
-
-
Field Detail
-
Scope_SIGNATURE
public static final java.lang.String Scope_SIGNATURE
create and send envelopes, and obtain links for starting signing sessions.- See Also:
- Constant Field Values
-
Scope_EXTENDED
public static final java.lang.String Scope_EXTENDED
obtain a refresh token with an extended lifetime.- See Also:
- Constant Field Values
-
Scope_IMPERSONATION
public static final java.lang.String Scope_IMPERSONATION
obtain access to the user’s account when the user is not present.- See Also:
- Constant Field Values
-
CODE
public static final java.lang.String CODE
used by public/native client applications.- See Also:
- Constant Field Values
-
TOKEN
public static final java.lang.String TOKEN
used by private/trusted client application.- See Also:
- Constant Field Values
-
PRODUCTION_OAUTH_BASEPATH
public static final java.lang.String PRODUCTION_OAUTH_BASEPATH
live/production base path.- See Also:
- Constant Field Values
-
DEMO_OAUTH_BASEPATH
public static final java.lang.String DEMO_OAUTH_BASEPATH
sandbox/demo base path.- See Also:
- Constant Field Values
-
STAGE_OAUTH_BASEPATH
public static final java.lang.String STAGE_OAUTH_BASEPATH
stage base path.- See Also:
- Constant Field Values
-
GRANT_TYPE_JWT
public static final java.lang.String GRANT_TYPE_JWT
JWT grant type.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
OAuth
public OAuth()
OAuth constructor.
-
OAuth
public OAuth(javax.ws.rs.client.Client client, org.apache.oltu.oauth2.client.request.OAuthClientRequest.TokenRequestBuilder tokenRequestBuilder, org.apache.oltu.oauth2.client.request.OAuthClientRequest.AuthenticationRequestBuilder authenticationRequestBuilder)OAuth constructor.- Parameters:
client- The client to usetokenRequestBuilder- The request builderauthenticationRequestBuilder- The auth request builder
-
OAuth
public OAuth(javax.ws.rs.client.Client client, OAuthFlow flow, java.lang.String authorizationUrl, java.lang.String tokenUrl, java.lang.String scopes)OAuth constructor.- Parameters:
client- The client to useflow- The OAuth flowauthorizationUrl- The auth urltokenUrl- The token URLscopes- The scopes to use
-
OAuth
public OAuth(OAuthFlow flow, java.lang.String authorizationUrl, java.lang.String tokenUrl, java.lang.String scopes)
OAuth constructor.- Parameters:
flow- The OAuth flowauthorizationUrl- The auth urltokenUrl- The token URLscopes- The scopes to use
-
-
Method Detail
-
applyToParams
public void applyToParams(java.util.List<Pair> queryParams, java.util.Map<java.lang.String,java.lang.String> headerParams)
applyToParams method.- Specified by:
applyToParamsin interfaceAuthentication- Parameters:
queryParams- The query paramsheaderParams- The header params
-
updateAccessToken
public void updateAccessToken() throws ApiExceptionupdateAccessToken method.- Throws:
ApiException
-
registerAccessTokenListener
public void registerAccessTokenListener(AccessTokenListener accessTokenListener)
registerAccessTokenListener method.- Parameters:
accessTokenListener- The access token listener
-
getAccessToken
public java.lang.String getAccessToken()
getAccessToken method.- Returns:
- String
-
setAccessToken
public void setAccessToken(java.lang.String accessToken, java.lang.Long expiresIn)
-
getTokenRequestBuilder
public org.apache.oltu.oauth2.client.request.OAuthClientRequest.TokenRequestBuilder getTokenRequestBuilder()
-
setTokenRequestBuilder
public void setTokenRequestBuilder(org.apache.oltu.oauth2.client.request.OAuthClientRequest.TokenRequestBuilder tokenRequestBuilder)
-
getAuthenticationRequestBuilder
public org.apache.oltu.oauth2.client.request.OAuthClientRequest.AuthenticationRequestBuilder getAuthenticationRequestBuilder()
-
setAuthenticationRequestBuilder
public void setAuthenticationRequestBuilder(org.apache.oltu.oauth2.client.request.OAuthClientRequest.AuthenticationRequestBuilder authenticationRequestBuilder)
-
getOauthClient
public org.apache.oltu.oauth2.client.OAuthClient getOauthClient()
-
setOauthClient
public void setOauthClient(org.apache.oltu.oauth2.client.OAuthClient oauthClient)
-
setOauthClient
public void setOauthClient(javax.ws.rs.client.Client client)
-
-