IdpValidationUtils

@MainActor
public struct IdpValidationUtils

Utility class for common IdP validation operations

  • Validates that a top view controller is available for presenting authentication UI

    Throws

    IdpExceptions.illegalStateException if no view controller is found

    Declaration

    Swift

    @MainActor
    public static func validateTopViewController() throws -> UIViewController

    Return Value

    The top view controller

  • Validates that a client ID is provided and not empty

    Throws

    IdpExceptions.illegalArgumentException if client ID is invalid

    Declaration

    Swift

    @MainActor
    public static func validateClientId(_ clientId: String?, provider: String) throws

    Parameters

    clientId

    The client ID to validate

    provider

    The name of the provider (for error messaging)