UriScheme

public enum UriScheme : String, CaseIterable, Sendable

Supported URI Schemes for MFA

  • Standard URI scheme for OTP (One-Time Password) authentication

    Declaration

    Swift

    case otpauth = "otpauth://"
  • URI scheme for Push Authentication

    Declaration

    Swift

    case pushauth = "pushauth://"
  • URI scheme for Combined Multi-Factor Authentication (Push & OTP)

    Declaration

    Swift

    case mfauth = "mfauth://"
  • The scheme string without the “://” suffix.

    Declaration

    Swift

    public var scheme: String { get }
  • Creates a UriScheme from a URL string.

    Declaration

    Swift

    public static func from(urlString: String) -> UriScheme?

    Parameters

    urlString

    The URL string to parse.

    Return Value

    The matching UriScheme, or nil if no match found.

  • Creates a UriScheme from a URL.

    Declaration

    Swift

    public static func from(url: URL) -> UriScheme?

    Parameters

    url

    The URL to parse.

    Return Value

    The matching UriScheme, or nil if no match found.

  • Checks if a URL string matches this scheme.

    Declaration

    Swift

    public func matches(urlString: String) -> Bool

    Parameters

    urlString

    The URL string to check.

    Return Value

    true if the URL string starts with this scheme.

  • Checks if a URL matches this scheme.

    Declaration

    Swift

    public func matches(url: URL) -> Bool

    Parameters

    url

    The URL to check.

    Return Value

    true if the URL uses this scheme.