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
continueNode
The
ContinueNode
to use.tokenType
The token type to use.
callbackURLScheme
The 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 -> Request
Parameters
url
The URL to which the authorization request is made.
Return Value
A [Request] object that can be used to continue the DaVinci flow.