Package com.docusign.admin.client.auth
Class OAuth
- java.lang.Object
-
- com.docusign.admin.client.auth.OAuth
-
- All Implemented Interfaces:
Authentication
public class OAuth extends 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 StringCODEused by public/native client applications.static StringDEMO_OAUTH_BASEPATHsandbox/demo base path.static StringGRANT_TYPE_JWTJWT grant type.static StringPRODUCTION_OAUTH_BASEPATHlive/production base path.static 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 path.static StringTOKENused by private/trusted client application.
-
Constructor Summary
Constructors Constructor Description OAuth()OAuth constructor.OAuth(OAuthFlow flow, String authorizationUrl, String tokenUrl, String scopes)OAuth constructor.OAuth(jakarta.ws.rs.client.Client client, OAuthFlow flow, String authorizationUrl, String tokenUrl, String scopes)OAuth constructor.OAuth(jakarta.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(List<Pair> queryParams, Map<String,String> headerParams)applyToParams method.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(String accessToken, Long expiresIn)voidsetAuthenticationRequestBuilder(org.apache.oltu.oauth2.client.request.OAuthClientRequest.AuthenticationRequestBuilder authenticationRequestBuilder)voidsetOauthClient(jakarta.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 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 constructor.
-
OAuth
public OAuth(jakarta.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(jakarta.ws.rs.client.Client client, OAuthFlow flow, String authorizationUrl, String tokenUrl, String scopes)OAuth constructor.- Parameters:
client- The client to useflow- The OAuth flowauthorizationUrl- The auth urltokenUrl- The token URLscopes- The scopes to use
-
-
Method Detail
-
applyToParams
public void applyToParams(List<Pair> queryParams, Map<String,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 String getAccessToken()
getAccessToken method.- Returns:
- String
-
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(jakarta.ws.rs.client.Client client)
-
-