AuthzModule
The protocol that authorization modules must adhere to.
-
Gateway to request authorization access.
Declaration
Swift
func requestAccess(completionHandler: (AnyObject?, NSError?) -> Void)
Parameters
completionHandler
A block object to be executed when the request operation finishes.
-
Request an authorization code.
Declaration
Swift
func requestAuthorizationCode(completionHandler: (AnyObject?, NSError?) -> Void)
Parameters
completionHandler
A block object to be executed when the request operation finishes.
-
Exchange an authorization code for an access token.
Declaration
Swift
func exchangeAuthorizationCodeForAccessToken(code: String, completionHandler: (AnyObject?, NSError?) -> Void)
Parameters
completionHandler
A block object to be executed when the request operation finishes.
-
Request to refresh an access token.
Declaration
Swift
func refreshAccessToken(completionHandler: (AnyObject?, NSError?) -> Void)
Parameters
completionHandler
A block object to be executed when the request operation finishes.
-
Request to revoke access.
Declaration
Swift
func revokeAccess(completionHandler: (AnyObject?, NSError?) -> Void)
Parameters
completionHandler
A block object to be executed when the request operation finishes.
-
Return any authorization fields.
Declaration
Swift
func authorizationFields() -> [String: String]?
Return Value
a dictionary filled with the authorization fields.
-
Returns a boolean indicating whether authorization has been granted.
Declaration
Swift
func isAuthorized() -> Bool
Return Value
true if authorized, false otherwise.