InBandOperationsMultiAccount
public protocol InBandOperationsMultiAccount
The InBandOperations
protocol specifies the FIDO operations and actions exposed by the SDK.
-
Asks an authenticator to display its specific settings interface.
Errors
In case of failure, the following errors can be returned as part of the result:
FIDOError.unknown
for any other kind of FIDO-related error, including user not responsive, user not enrolled, unable to change or set the credential or other internal errors.
Declaration
Swift
func openSettings(username: Username, userInteractionDelegate: OpenSettingsUserInteractionDelegate, completion handler: @escaping (_ result: Result<(), Error>) -> ())
Parameters
username
Username to be used when setting the authenticator.
userInteractionDelegate
A delegate object responsible for handling user interaction on the current FIDO operation.
handler
A completion handler executed when the operation is completed.
result
A single argument that represents either a successful result or a failure with an error.
-
Asks the FIDO Client to deregister user keys for one authenticators.
Errors
In case of failure, the following errors can be returned as part of the result:
NevisError.networking
in case of HTTP error while retrieving aDeregistrationRequest
;NevisError.missingUAFRequest
if noDeregistrationRequest
can be retrieved;NevisError.failedOperation
if theUAFStatusCode
from the server response does not represent a success;Any kind of
FIDOError
for FIDO-related errors.
Declaration
Swift
func deregisterAuthenticator(username: Username, authorizationProvider: AuthorizationProvider?, userInteractionDelegate: DeregistrationUserInteractionDelegate, completion handler: @escaping (Result<(), Error>) -> ())
Parameters
username
Username to be used for deregistration process.
authorizationProvider
An optional
AuthorizationProvider
to provide credentials required to perform authorization, if the FIDO UAF deregistration endpoint is protected and requires authorization.userInteractionDelegate
A delegate object responsible for handling user interaction on the current FIDO operation.
handler
A completion handler executed when the deregistration is completed.
result
A single argument that represents either a successful result or a failure with an error.
-
Asks the FIDO Client to deregister user keys for all authenticators registered to an account.
In case of deregistration of multiple keys or authenticators, the operation will succeed if all deregistrations work, or stop after the first error occurs.
Errors
In case of failure, the following errors can be returned as part of the result:
NevisError.networking
in case of HTTP error while retrieving aDeregistrationRequest
;NevisError.missingUAFRequest
if noDeregistrationRequest
can be retrieved;NevisError.failedOperation
if theUAFStatusCode
from the server response does not represent a success;Any kind of
FIDOError
for FIDO-related errors.
Declaration
Swift
func deregisterAccount(username: Username, authorizationProvider: AuthorizationProvider?, userInteractionDelegate: DeregistrationUserInteractionDelegate, completion handler: @escaping (Result<(), Error>) -> ())
Parameters
username
Username to be used for deregistration process.
authorizationProvider
An optional
AuthorizationProvider
to provide credentials required to perform authorization, if the FIDO UAF deregistration endpoint is protected and requires authorization.userInteractionDelegate
A delegate object responsible for handling user interaction on the current FIDO operation.
handler
A completion handler executed when the deregistration is completed.
result
A single argument that represents either a successful result or a failure with an error.
-
Asks the FIDO Client to authenticate user with server-specified authenticators, and return a valid credential.
Important
In order for this operation to succeed, the authenticator and the relying party must have a previously shared registration.Errors
In case of failure, the following errors can be returned as part of the result:
NevisError.networking
in case of HTTP error while retrieving aAuthenticationRequest
or sending anAuthenticationResponse
;NevisError.missingUAFRequest
if noAuthenticationRequest
can be retrieved;NevisError.failedOperation
if theUAFStatusCode
from the server response does not represent a success;Any kind of
FIDOError
for FIDO-related errors.
Declaration
Swift
func authenticate(username: Username, sessionProvider: SessionProvider?, userInteractionDelegate: UserInteractionDelegate, completion handler: @escaping (Result<AuthorizationProvider, Error>) -> ())
Parameters
username
The username required to the authentication.
sessionProvider
An optional session provider to pass authorization information required to the authentication.
userInteractionDelegate
A delegate object responsible for handling user interaction on the current FIDO operation.
handler
A completion handler executed when the authentication is completed.
result
A single argument that represents either a success with an authorization provider or a failure with an error.