SessionProtocol
public protocol SessionProtocol
Defines methods for managing session token.
-
Gets accesss token
Declaration
Swift
func getAccessToken(completion: @escaping AccessTokenClosure)Parameters
completionCompletion for obtaining access token.
Return Value
AccessTokenClosure containing either token string or error.
-
Revokes all the tokens
Declaration
Swift
func revokeTokens(completion: @escaping Callback<Void>)Parameters
completionReturns either empty result representing success or error.
-
Downscope the token.
Declaration
Swift
func downscopeToken(scope: Set<TokenScope>, resource: String?, completion: @escaping TokenInfoClosure)Parameters
scopeScope or scopes that you want to apply to the resulting token.
resourceFull url path to the file that the token should be generated for, eg: https://api.box.com/2.0/files/{file_id}
completionReturns the success or an error.
SessionProtocol Protocol Reference