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 Object implements Authentication
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classOAuth.AccountAccount model with the following properties:
accountId: the account ID GUID.static classOAuth.LinkLink model with the following properties:
rel: currently the only value is "self".static classOAuth.OAuthTokenOAuthToken model with the following properties:
accessToken: the token you will use in the Authorization header of calls to the DocuSign API.static classOAuth.OrganizationOrganization model with the following properties:
organizationId: the organization ID GUID if DocuSign Org Admin is enabled.static classOAuth.UserInfoUserInfo model with the following properties:
sub: the user ID GUID.
-
Field Summary
Fields Modifier and Type Field Description static StringCODEused by public/native client applications.static StringDEMO_OAUTH_BASEPATHsandbox/demo base pathstatic StringGRANT_TYPE_JWTJWT grant typestatic StringPRODUCTION_OAUTH_BASEPATHlive/production base pathstatic StringScope_EXTENDEDobtain a refresh token with an extended lifetime.static StringScope_IMPERSONATIONobtain access to the user’s account when the user is not present.static StringScope_SIGNATUREcreate and send envelopes, and obtain links for starting signing sessions.static StringSTAGE_OAUTH_BASEPATHstage base pathstatic StringTOKENused by private/trusted client application.
-
Constructor Summary
Constructors Constructor Description OAuth()OAuth(OAuthFlow flow, String authorizationUrl, String tokenUrl, String scopes)OAuth(javax.ws.rs.client.Client client, OAuthFlow flow, String authorizationUrl, String tokenUrl, String scopes)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)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidapplyToParams(List<Pair> queryParams, Map<String,String> headerParams)Apply authentication settings to header and query params.StringgetAccessToken()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)voidsetAccessToken(String accessToken, 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()
-
-
-
Field Detail
-
Scope_SIGNATURE
public static final String Scope_SIGNATURE
create and send envelopes, and obtain links for starting signing sessions.- See Also:
- Constant Field Values
-
Scope_EXTENDED
public static final String Scope_EXTENDED
obtain a refresh token with an extended lifetime.- See Also:
- Constant Field Values
-
Scope_IMPERSONATION
public static final 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 String CODE
used by public/native client applications.- See Also:
- Constant Field Values
-
TOKEN
public static final String TOKEN
used by private/trusted client application.- See Also:
- Constant Field Values
-
PRODUCTION_OAUTH_BASEPATH
public static final String PRODUCTION_OAUTH_BASEPATH
live/production base path- See Also:
- Constant Field Values
-
DEMO_OAUTH_BASEPATH
public static final String DEMO_OAUTH_BASEPATH
sandbox/demo base path- See Also:
- Constant Field Values
-
STAGE_OAUTH_BASEPATH
public static final String STAGE_OAUTH_BASEPATH
stage base path- See Also:
- Constant Field Values
-
GRANT_TYPE_JWT
public static final String GRANT_TYPE_JWT
JWT grant type- See Also:
- Constant Field Values
-
-
Constructor Detail
-
OAuth
public OAuth()
-
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
public OAuth(javax.ws.rs.client.Client client, OAuthFlow flow, String authorizationUrl, String tokenUrl, String scopes)
-
-
Method Detail
-
applyToParams
public void applyToParams(List<Pair> queryParams, Map<String,String> headerParams)
Description copied from interface:AuthenticationApply authentication settings to header and query params.- Specified by:
applyToParamsin interfaceAuthentication- Parameters:
queryParams- List of query parametersheaderParams- Map of header parameters
-
updateAccessToken
public void updateAccessToken() throws ApiException- Throws:
ApiException
-
registerAccessTokenListener
public void registerAccessTokenListener(AccessTokenListener accessTokenListener)
-
getAccessToken
public String getAccessToken()
-
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)
-
-