BrowserBasedAuthenticationHandler

open class BrowserBasedAuthenticationHandler: OnlineAuthenticationHandler

OnlineAuthenticationHandler subclass for handling browser-based based online authentication.

Handles displaying an authentication web page, intercepting an Oauth2 redirect, and parsing the results.

  • Initializes and returns a BrowserBasedAuthenticationHandler object with the provided parameters

    Declaration

    Swift

    public init(redirectURI: String)

    Parameters

    redirectURI

    URI of the redirect used to indicate the browser-based Oauth2 authentication flow has completed successfully.

  • Not expected to be called from external consumers.

    Subclasses may override this method to provide additional query parameters to the loadWebAuthenticationUrl sent to the BrowserBasedAuthenticationHandlerDelegate

    See also: BrowserBasedAuthenticationHandlerDelegate.authenticationHandler(, loadWebAuthenticationUrl: , shouldFollowRedirect:)

    See also

    BrowserBasedAuthenticationHandlerDelegate.authenticationHandler(, loadWebAuthenticationUrl: , shouldFollowRedirect:)

    Declaration

    Swift

    open func createAuthenticationLoginQueryItems() -> [URLQueryItem]
  • Not expected to be called from external consumers.

    Subclasses may override this method to provide alternative query parameter parsing, or additional key/value pairs to the parsed query paremeters detected on the redirectURI following successful browser authentication.

    • from: URL containing query string parameters to parse

    Declaration

    Swift

    open func parseAuthenticationRedirectQueryParameters(from url: URL) -> [String: String]

    Return Value

    key/value pairs from query string. If a query string key contains no value, a empty string will be the dictionary value. If the url contained no parameters, this an empty dictionary will be returned.

  • Not expected to be called from external consumers.

    Subclasses may override this method to provide additional functionality prior to the authentication process.

    Performs the online browser-based authentication process, calling the authenticationBrowserDelegate to display the authentication URL.

    Declaration

    Swift

    open override func performOnlineAuthentication()