OAuth2AuthorizerUI
public protocol OAuth2AuthorizerUI
Platform-dependent authorizers must adopt this protocol.
-
The OAuth2 instance this authorizer belongs to.
Declaration
Swift
unowned var oauth2: OAuth2Base
-
Open the authorize URL in the OS browser.
Throws
UnableToOpenAuthorizeURL on failureDeclaration
Swift
func openAuthorizeURLInBrowser(_ url: URL) throws
Parameters
url
The authorize URL to open
-
Tries to use the given context to present the authorization screen. Context could be a UIViewController for iOS or an NSWindow on macOS.
Throws
Can throw OAuth2Error if the method is unable to show the authorize screenDeclaration
Swift
func authorizeEmbedded(with config: OAuth2AuthConfig, at url: URL) throws
Parameters
with
The configuration to be used; usually uses the instance’s
authConfig
at
The authorize URL to open