public class DbxPKCEManager
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CODE_CHALLENGE_METHODS |
static int |
CODE_VERIFIER_SIZE |
Constructor and Description |
---|
DbxPKCEManager()
This class has state.
|
DbxPKCEManager(java.lang.String codeVerifier) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getCodeChallenge() |
java.lang.String |
getCodeVerifier() |
DbxAuthFinish |
makeTokenRequest(DbxRequestConfig requestConfig,
java.lang.String oauth2Code,
java.lang.String appKey,
java.lang.String redirectUri,
DbxHost host)
Make oauth2/token request to exchange code for oauth2 access token.
|
public static final java.lang.String CODE_CHALLENGE_METHODS
public static final int CODE_VERIFIER_SIZE
public DbxPKCEManager()
public DbxPKCEManager(java.lang.String codeVerifier)
public java.lang.String getCodeVerifier()
public java.lang.String getCodeChallenge()
public DbxAuthFinish makeTokenRequest(DbxRequestConfig requestConfig, java.lang.String oauth2Code, java.lang.String appKey, java.lang.String redirectUri, DbxHost host) throws DbxException
requestConfig
- Default attributes to use for each request.oauth2Code
- OAuth2 code defined in OAuth2 code flow.appKey
- Client KeyredirectUri
- The same redirect_uri that's used in preivous oauth2/authorize call.host
- Only used for testing when you don't want to make request against production.DbxException
- If reqeust is invalid, or code expired, or server error.