public class AuthorizationManager extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
AuthorizationManager.Builder |
| Modifier and Type | Field and Description |
|---|---|
Authentication |
auth |
NetworkSession |
networkSession |
| Modifier | Constructor and Description |
|---|---|
|
AuthorizationManager() |
protected |
AuthorizationManager(AuthorizationManager.Builder builder) |
| Modifier and Type | Method and Description |
|---|---|
void |
authorizeUser(AuthorizeUserQueryParams queryParams)
Authorize a user by sending them through the [Box](https://box.com) website and request their
permission to act on their behalf.
|
void |
authorizeUser(AuthorizeUserQueryParams queryParams,
AuthorizeUserHeaders headers)
Authorize a user by sending them through the [Box](https://box.com) website and request their
permission to act on their behalf.
|
Authentication |
getAuth() |
NetworkSession |
getNetworkSession() |
AccessToken |
refreshAccessToken(PostOAuth2TokenRefreshAccessToken requestBody)
Refresh an Access Token using its client ID, secret, and refresh token.
|
AccessToken |
refreshAccessToken(PostOAuth2TokenRefreshAccessToken requestBody,
RefreshAccessTokenHeaders headers)
Refresh an Access Token using its client ID, secret, and refresh token.
|
AccessToken |
requestAccessToken(PostOAuth2Token requestBody)
Request an Access Token using either a client-side obtained OAuth 2.0 authorization code or a
server-side JWT assertion.
|
AccessToken |
requestAccessToken(PostOAuth2Token requestBody,
RequestAccessTokenHeaders headers)
Request an Access Token using either a client-side obtained OAuth 2.0 authorization code or a
server-side JWT assertion.
|
void |
revokeAccessToken(PostOAuth2Revoke requestBody)
Revoke an active Access Token, effectively logging a user out that has been previously
authenticated.
|
void |
revokeAccessToken(PostOAuth2Revoke requestBody,
RevokeAccessTokenHeaders headers)
Revoke an active Access Token, effectively logging a user out that has been previously
authenticated.
|
public Authentication auth
public NetworkSession networkSession
public AuthorizationManager()
protected AuthorizationManager(AuthorizationManager.Builder builder)
public void authorizeUser(AuthorizeUserQueryParams queryParams)
This is the first step when authenticating a user using OAuth 2.0. To request a user's authorization to use the Box APIs on their behalf you will need to send a user to the URL with this format.
queryParams - Query parameters of authorizeUser methodpublic void authorizeUser(AuthorizeUserQueryParams queryParams, AuthorizeUserHeaders headers)
This is the first step when authenticating a user using OAuth 2.0. To request a user's authorization to use the Box APIs on their behalf you will need to send a user to the URL with this format.
queryParams - Query parameters of authorizeUser methodheaders - Headers of authorizeUser methodpublic AccessToken requestAccessToken(PostOAuth2Token requestBody)
An Access Token is a string that enables Box to verify that a request belongs to an authorized session. In the normal order of operations you will begin by requesting authentication from the [authorize](https://developer.box.com/reference/get-authorize) endpoint and Box will send you an authorization code.
You will then send this code to this endpoint to exchange it for an Access Token. The returned Access Token can then be used to to make Box API calls.
requestBody - Request body of requestAccessToken methodpublic AccessToken requestAccessToken(PostOAuth2Token requestBody, RequestAccessTokenHeaders headers)
An Access Token is a string that enables Box to verify that a request belongs to an authorized session. In the normal order of operations you will begin by requesting authentication from the [authorize](https://developer.box.com/reference/get-authorize) endpoint and Box will send you an authorization code.
You will then send this code to this endpoint to exchange it for an Access Token. The returned Access Token can then be used to to make Box API calls.
requestBody - Request body of requestAccessToken methodheaders - Headers of requestAccessToken methodpublic AccessToken refreshAccessToken(PostOAuth2TokenRefreshAccessToken requestBody)
requestBody - Request body of refreshAccessToken methodpublic AccessToken refreshAccessToken(PostOAuth2TokenRefreshAccessToken requestBody, RefreshAccessTokenHeaders headers)
requestBody - Request body of refreshAccessToken methodheaders - Headers of refreshAccessToken methodpublic void revokeAccessToken(PostOAuth2Revoke requestBody)
requestBody - Request body of revokeAccessToken methodpublic void revokeAccessToken(PostOAuth2Revoke requestBody, RevokeAccessTokenHeaders headers)
requestBody - Request body of revokeAccessToken methodheaders - Headers of revokeAccessToken methodpublic Authentication getAuth()
public NetworkSession getNetworkSession()