public class PostOAuth2Token extends SerializableObject
| Modifier and Type | Class and Description |
|---|---|
static class |
PostOAuth2Token.Builder |
| Modifier and Type | Field and Description |
|---|---|
protected String |
actorToken
The token used to create an annotator token.
|
protected EnumWrapper<PostOAuth2TokenActorTokenTypeField> |
actorTokenType
The type of `actor_token` passed in.
|
protected String |
assertion
A JWT assertion for which to request a new access token.
|
protected String |
boxSharedLink
Full URL of the shared link on the file or folder that the token should be generated for.
|
protected String |
boxSubjectId
Used in combination with `client_credentials` as the `grant_type`.
|
protected EnumWrapper<PostOAuth2TokenBoxSubjectTypeField> |
boxSubjectType
Used in combination with `client_credentials` as the `grant_type`.
|
protected String |
clientId
The Client ID of the application requesting an access token.
|
protected String |
clientSecret
The client secret of the application requesting an access token.
|
protected String |
code
The client-side authorization code passed to your application by Box in the browser redirect
after the user has successfully granted your application permission to make API calls on their
behalf.
|
protected EnumWrapper<PostOAuth2TokenGrantTypeField> |
grantType
The type of request being made, either using a client-side obtained authorization code, a
refresh token, a JWT assertion, client credentials grant or another access token for the
purpose of downscoping a token.
|
protected String |
refreshToken
A refresh token used to get a new access token with.
|
protected String |
resource
Full URL for the file that the token should be generated for.
|
protected String |
scope
The space-delimited list of scopes that you want apply to the new access token.
|
protected String |
subjectToken
The token to exchange for a downscoped token.
|
protected EnumWrapper<PostOAuth2TokenSubjectTokenTypeField> |
subjectTokenType
The type of `subject_token` passed in.
|
explicitlySetNullableFields| Modifier | Constructor and Description |
|---|---|
|
PostOAuth2Token(EnumWrapper<PostOAuth2TokenGrantTypeField> grantType) |
protected |
PostOAuth2Token(PostOAuth2Token.Builder builder) |
|
PostOAuth2Token(PostOAuth2TokenGrantTypeField grantType) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
String |
getActorToken() |
EnumWrapper<PostOAuth2TokenActorTokenTypeField> |
getActorTokenType() |
String |
getAssertion() |
String |
getBoxSharedLink() |
String |
getBoxSubjectId() |
EnumWrapper<PostOAuth2TokenBoxSubjectTypeField> |
getBoxSubjectType() |
String |
getClientId() |
String |
getClientSecret() |
String |
getCode() |
EnumWrapper<PostOAuth2TokenGrantTypeField> |
getGrantType() |
String |
getRefreshToken() |
String |
getResource() |
String |
getScope() |
String |
getSubjectToken() |
EnumWrapper<PostOAuth2TokenSubjectTokenTypeField> |
getSubjectTokenType() |
int |
hashCode() |
String |
toString() |
getRawData, setRawDatagetExplicitlySetNullableFields, isFieldExplicitlySet, markNullableFieldAsSet, markNullableFieldsAsSetprotected final EnumWrapper<PostOAuth2TokenGrantTypeField> grantType
protected String clientId
Used in combination with `authorization_code`, `client_credentials`, or `urn:ietf:params:oauth:grant-type:jwt-bearer` as the `grant_type`.
protected String clientSecret
Used in combination with `authorization_code`, `client_credentials`, or `urn:ietf:params:oauth:grant-type:jwt-bearer` as the `grant_type`.
protected String code
Used in combination with `authorization_code` as the `grant_type`.
protected String refreshToken
Used in combination with `refresh_token` as the `grant_type`.
protected String assertion
Used in combination with `urn:ietf:params:oauth:grant-type:jwt-bearer` as the `grant_type`.
protected String subjectToken
Used in combination with `urn:ietf:params:oauth:grant-type:token-exchange` as the `grant_type`.
protected EnumWrapper<PostOAuth2TokenSubjectTokenTypeField> subjectTokenType
Used in combination with `urn:ietf:params:oauth:grant-type:token-exchange` as the `grant_type`.
protected String actorToken
Used in combination with `urn:ietf:params:oauth:grant-type:token-exchange` as the `grant_type`.
protected EnumWrapper<PostOAuth2TokenActorTokenTypeField> actorTokenType
Used in combination with `urn:ietf:params:oauth:grant-type:token-exchange` as the `grant_type`.
protected String scope
The `subject_token` will need to have all of these scopes or the call will error with **401 Unauthorized**..
protected EnumWrapper<PostOAuth2TokenBoxSubjectTypeField> boxSubjectType
protected String boxSubjectId
protected String boxSharedLink
public PostOAuth2Token(PostOAuth2TokenGrantTypeField grantType)
public PostOAuth2Token(EnumWrapper<PostOAuth2TokenGrantTypeField> grantType)
protected PostOAuth2Token(PostOAuth2Token.Builder builder)
public EnumWrapper<PostOAuth2TokenGrantTypeField> getGrantType()
public String getClientId()
public String getClientSecret()
public String getRefreshToken()
public String getAssertion()
public String getSubjectToken()
public EnumWrapper<PostOAuth2TokenSubjectTokenTypeField> getSubjectTokenType()
public String getActorToken()
public EnumWrapper<PostOAuth2TokenActorTokenTypeField> getActorTokenType()
public String getResource()
public EnumWrapper<PostOAuth2TokenBoxSubjectTypeField> getBoxSubjectType()
public String getBoxSubjectId()
public String getBoxSharedLink()