Policy

public struct Policy : Codable

A Policy object contains a specification of accepted authenticators and a specification of disallowed authenticators.

  • A two-dimensional array describing the required authenticator characteristics for the server to accept either a FIDO registration, or authentication operation for a particular purpose.

    Note

    The first array index indicates OR conditions. Any set of authenticator(s) satisfying these MatchCriteria in the first index is acceptable to the server for this operation. Sub-arrays of MatchCriteria in the second index indicate that multiple authenticators must be registered or authenticated to be accepted by the server.

    Declaration

    Swift

    public let accepted: [[MatchCriteria]]
  • Any authenticator that matches any of MatchCriteria contained in this list must be excluded from eligibility for the operation, regardless of whether it matches any MatchCriteria present in the accepted list, or not.

    Declaration

    Swift

    public let disallowed: [MatchCriteria]
  • Creates a new Policy instance.

    Declaration

    Swift

    public init(accepted: [[MatchCriteria]] = [], disallowed: [MatchCriteria] = [])

    Parameters

    accepted

    A two-dimensional array describing the required authenticator characteristics for the server to accept either a FIDO registration, or authentication operation for a particular purpose.

    disallowed

    Any authenticator that matches any of MatchCriteria contained in this list must be excluded from eligibility for the operation, regardless of whether it matches any MatchCriteria present in the accepted list, or not.

  • Declaration

    Swift

    public init(from decoder: Decoder) throws