UAAAuthorizationHandler
open class UAAAuthorizationHandler: AuthorizationHandler
AuthorizationHandler to extract authorization data from the UAA oAuth token
-
Initializes and returns a UAAAuthorizationHandler object
Declaration
Swift
public init()
-
Starts the authorization process.
Called by the associated
AuthenticationManagerwhen needed.Declaration
Swift
open func authorize(authenticationPayload: [String : Any], completionHandler: @escaping (_ userInformation: [String : Any]) -> Void)Parameters
authenticationPayloadthe dictionary of information gathered during the authentication process. This information usually contains user-identifying tokens which are exchanged for specific user data during the authentication process.
completionHandlerclosure called when authorization has completed.
userInformationdictionary of user information retrieved during the authorization process.
-
Parses a UAA access token, and returns a dictionary of the token’s data components
Declaration
Swift
open func parseAuthenticationData(from token: String) -> [String: Any]Parameters
tokenA UAA access token
Return Value
dictionary of elements extracted from the provided token
-
Extracts the user name from the provided authentication data dictionary, and creates a
Userobject.Declaration
Swift
open func createUser(authenticationData: [String: Any], userNameKey: String) -> User?Parameters
authenticationDataDictionary of elements
userNameKeyKey in the dictionary of the user name
Return Value
Userobject created with the user’s name, or nil if no user name could be found
View on GitHub
UAAAuthorizationHandler Class Reference