UAF

public protocol UAF

The UAF protocol exposes the API used by relying party client application to communicate with a FIDO UAF Client.

The UAF API is described in the FIDO UAF Application API and Transport Binding Specification.

  • Asks the FIDO Client to register the user with a FIDO authenticator matching the policy defined in the request.

    Note

    If at least one authenticator is matching the given policy and other requirements, the selectAuthenticator(_:completion:) method of the user interaction delegate will be called. The app should then present the list of available authenticators to the user, who can select the one to be used for the registration.

    Declaration

    Swift

    func register(_ uafRequest: RegistrationRequest, channelBinding: ChannelBinding, userInteractionDelegate: UserInteractionDelegate, operationState: RegistrationOperationState, completion: @escaping (Result<RegistrationResponse, Error>) -> ())

    Parameters

    uafRequest

    The registration request that contains information to be used by the FIDO Client during registration.

    channelBinding

    The channel binding information.

    handler

    A completion handler executed when the registration is completed. The handler contains a single argument that represents either a successful result with a response or a failure result with an error.

  • Asks the FIDO Client to deregister user keys for one or multiple authenticators.

    Note

    In case of deregistration of multiple keys or authenticators, the operation will succeed if all deregistrations work, or stop after the first error occurs.

    Declaration

    Swift

    func deregister(_ uafRequest: DeregistrationRequest, completion handler: @escaping (Result<(), Error>) -> ())

    Parameters

    uafRequest

    The deregistration request that contains information about the authenticator(s) to be deleted.

    handler

    A completion handler executed when the deregistration is completed. The handler contains a single result argument that represents either a success or a failure with an associated error.

  • Asks the FIDO Client to authenticate user with server-specified authenticators, and return an authentication response.

    Note

    In order for this operation to succeed, the authenticator and the relying party must have a previously shared registration.

    Declaration

    Swift

    func authenticate(_ uafRequest: AuthenticationRequest, channelBinding: ChannelBinding, userInteractionDelegate: UserInteractionDelegate, completion: @escaping (Result<AuthenticationResponse, Error>) -> ())

    Parameters

    uafRequest

    The authentication request that contains information about the transaction(s).

    handler

    A completion handler executed when the authentication is completed. The handler contains a single result argument that represents either a success or a failure with an associated error.

  • NonFIDO function to get information about authenticators and their registrations (AaidAndKeyID array) for the deregistration operation.

    Declaration

    Swift

    func fetchRegistrationInfo() -> [RegistrationInfo]

    Parameters

    completion

    Called back on completion with an array or RegistrationInfo in case of success, or an Error otherwise.