NuguOAuthClient
public extension NuguOAuthClient
-
Get some NUGU member information.
ConfigurationStoremust be configured.Declaration
Swift
func getUserInfo(completion: @escaping (Result<NuguUserInfo, NuguLoginKitError>) -> Void)Parameters
completionThe closure to receive result for getting NUGU member information.
-
Shows web-page where TID information can be modified with
AuthorizationCodegrant type.ConfigurationStoremust be configured.Declaration
Swift
func showTidInfo(parentViewController: UIViewController, completion: @escaping (Result<AuthorizationInfo, NuguLoginKitError>) -> Void)Parameters
parentViewControllerThe
parentViewControllerwill present a safariViewController.completionThe closure to receive result for authorization.
-
Authorize with
AuthorizationCodegrant type.ConfigurationStoremust be configured.Declaration
Swift
func authorizeWithTid(parentViewController: UIViewController, completion: @escaping (Result<AuthorizationInfo, NuguLoginKitError>) -> Void)Parameters
parentViewControllerThe
parentViewControllerwill present a safariViewController.completionThe closure to receive result for authorization.
-
Authorize with
RefreshTokengrant type.ConfigurationStoremust be configured.Declaration
Swift
func refreshToken(refreshToken: String, completion: @escaping (Result<AuthorizationInfo, NuguLoginKitError>) -> Void)Parameters
refreshTokenThe
refreshTokenfor OAuth authentication.completionThe closure to receive result for authorization.
-
Authorize with
ClientCredentialsgrant type.ConfigurationStoremust be configured.Declaration
Swift
func authorize(completion: @escaping (Result<AuthorizationInfo, NuguLoginKitError>) -> Void)Parameters
completionThe closure to receive result for authorization.
-
Revoke completly with NUGU
ConfigurationStoremust be configured.Declaration
Swift
func revoke(completion: @escaping (EndedUp<NuguLoginKitError>) -> Void)Parameters
completionThe closure to receive result for
revoke.
View on GitHub
NuguOAuthClient Extension Reference