IdpCollector
@objc
open class IdpCollector : NSObject, Collector, ContinueNodeAware, RequestInterceptor, @unchecked Sendable
A collector class for handling Identity Provider (IdP) authorization.
- property continueNode: The continue node.
- property id: The unique identifier for the collector.
- property idpType: The type of IdP.
- property label: The label for the IdP.
- property link: The URL link for IdP authentication.
- property nativeHandler: The native handler for the IdP request.
- property resumeRequest: The request to resume the DaVinci flow.
-
ContinueNode property
Declaration
Swift
public var continueNode: ContinueNode? -
The unique identifier for the collector.
Declaration
Swift
public var id: String { get } -
Indicates whether the IdP is enabled.
Declaration
Swift
public var idpEnabled: Bool -
The IdP identifier.
Declaration
Swift
public var idpId: String -
The type of IdP.
Declaration
Swift
public var idpType: String -
The label for the IdP.
Declaration
Swift
public var label: String -
The URL link for IdP authentication.
Declaration
Swift
public var link: URL? -
The native handler for the IdP request.
Declaration
Swift
public var nativeHandler: IdpRequestHandler? -
The request to resume the DaVinci flow.
Declaration
Swift
public var resumeRequest: Request? -
Initializes the
IdpCollectorwith the given JSON input.Declaration
Swift
public required init(with json: [String : Any]) -
Initializes the IdpCollector with a value.
Declaration
Swift
public func initialize(with value: Any) -
Registers the IdpCollector with the collector factory
Declaration
Swift
@objc public static func registerCollector() -
authorize(callbackURLScheme:Asynchronous) Authorizes the IdP.
Declaration
Swift
open func authorize(callbackURLScheme: String? = nil) async -> Result<Bool, IdpExceptions>Parameters
callbackURLSchemeThe callback URL scheme.
-
Intercepts the request.
Declaration
Swift
public func intercept(context: FlowContext, request: Request) -> RequestParameters
contextThe flow context.
requestThe request to intercept.
-
Function returning the
Payloadof the IdP collector. This is a function that returnsNeveras a nonreturning function as the IDPCollector has no payload to return.Declaration
Swift
public func payload() -> Never? -
Gets the default IdP handler for the Provider. It will either be AppleRequestHandler, GoogleRequestHandler, FacebookRequestHandler
Declaration
Swift
@MainActor public func getDefaultIdpHandler(httpClient: HttpClient) -> IdpRequestHandler?Return Value
The IdpRequestHandler.
-
fallbackToBrowserHandler(callbackURLScheme:Asynchronousurl: ) Fallback to the browser handler.
Declaration
Swift
public func fallbackToBrowserHandler(callbackURLScheme: String? = nil, url: URL) async -> Result<Bool, IdpExceptions>Return Value
A Result of type Bool or An IdpExceptions error.
View on GitHub