OAuth2ClientCredentials
open class OAuth2ClientCredentials: OAuth2
Class to handle two-legged OAuth2 requests of the client_credentials
type.
-
Class to handle two-legged OAuth2 requests of the
client_credentials
type.Declaration
Swift
override open class var grantType: String
-
Class to handle two-legged OAuth2 requests of the
client_credentials
type.Declaration
Swift
override open func doAuthorize(params inParams: OAuth2StringDict? = nil)
Parameters
params
Optional key/value pairs to pass during authorization
-
Creates a POST request with x-www-form-urlencoded body created from the supplied URL’s query part.
Declaration
Swift
open func accessTokenRequest(params: OAuth2StringDict? = nil) throws -> OAuth2AuthRequest
-
Use the client credentials to retrieve a fresh access token.
Uses
accessTokenRequest(params:)
to create the request, which you can subclass to change implementation specifics.Declaration
Swift
public func obtainAccessToken(params: OAuth2StringDict? = nil, callback: @escaping ((_ params: OAuth2JSON?, _ error: OAuth2Error?) -> Void))
Parameters
callback
The callback to call after the process has finished