BrowserHandler
@MainActor
public class BrowserHandler : IdpRequestHandler
A handler class for managing browser-based Identity Provider (IdP) authorization.
-
Declaration
Swift
@MainActor public var continueNode: ContinueNode -
Declaration
Swift
@MainActor public var callbackURLScheme: String -
Initializes a new instance of
BrowserHandler.Declaration
Swift
@MainActor public init(continueNode: ContinueNode, callbackURLScheme: String)Parameters
continueNodeThe
ContinueNodeto use.tokenTypeThe token type to use.
callbackURLSchemeThe callback URL scheme to use.
-
authorize(url:Asynchronous) Authorizes a user by making a request to the given URL. This function takes a JSON object and extracts the “form” field. It then iterates over the “fields” array in the “components” object, parsing each field into a collector and adding it to a list.
Declaration
Swift
@MainActor public func authorize(url: URL?) async throws -> RequestParameters
urlThe URL to which the authorization request is made.
Return Value
A [Request] object that can be used to continue the DaVinci flow.
View on GitHub