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
UriSchemefrom a URL string.Declaration
Swift
public static func from(urlString: String) -> UriScheme?Parameters
urlStringThe URL string to parse.
Return Value
The matching
UriScheme, ornilif no match found. -
Creates a
UriSchemefrom a URL.Declaration
Swift
public static func from(url: URL) -> UriScheme?Parameters
urlThe URL to parse.
Return Value
The matching
UriScheme, ornilif no match found. -
Checks if a URL string matches this scheme.
Declaration
Swift
public func matches(urlString: String) -> BoolParameters
urlStringThe URL string to check.
Return Value
trueif the URL string starts with this scheme. -
Checks if a URL matches this scheme.
Declaration
Swift
public func matches(url: URL) -> BoolParameters
urlThe URL to check.
Return Value
trueif the URL uses this scheme.
View on GitHub