OAuthAuthorizationFlowView
public protocol OAuthAuthorizationFlowView
Executes UI-specific actions related to the OAuth authorization flow.
-
Presents a web view to the user showing a page at a specific address. The web view should forward navigation actions and the user attempting to exit the web view to the provided blocks.
Declaration
Swift
func presentWebView(url: URL, interceptNavigation: @escaping (URL) -> Bool, didCancel: @escaping () -> Void)
Parameters
url
The address to open in the web view.
interceptNavigation
A block to be called when the web view attempts a redirection. The block should be invoked with the destination address. Returns
true
when the web view should cancel the redirection, andfalse
otherwise. The block must be called on the main thread.didCancel
A block to be called when the user attempts to exit the web view by means of a button, gesture, etc. The block must be called on the main thread.
-
Dismisses the web view presented using
presentWebView(:interceptNavigation:didCancel:)
Declaration
Swift
func dismissWebView()