NMAAuthenticatorSelectionContext
@objc
public protocol NMAAuthenticatorSelectionContext : DictionaryEncodable
The service returning the information required to choose the authenticator to be used: it returns all the available authenticators, the operation being executed and also informs whether a given authenticator is compliant with the policy required by the FIDO UAF server for the ongoing operation.
-
The account used to execute the operation.
Declaration
Swift
var account: NMAAccount { get }
-
The available authenticators.
Note
that this may also include authenticators that cannot be used to complete the operation.All the available authenticators are returned, so that the users of the SDK can figure out not only whether an account authenticator can be used for the operation, but also why. For example, a developer would like to give a visual hint explaining why the Biometric authenticator for a given user cannot be used during authentication if it is not registered.
Note
ProvidingArray
instead ofSet
to be aligned with the Swift API.Declaration
Swift
var authenticators: [NMAAuthenticator] { get }
-
The transaction confirmation data, if any, to be presented to the user for verification. If this data is present, data must be presented to the user before authenticating.
Note
the exact format of the message may depend on the server, e.g. a simple String or a JSON representation.Note
that in the case of registration or authentication not involving transaction confirmation, this is typically empty and thus, it does not require handling.Declaration
Swift
var transactionConfirmationData: Data? { get }
-
Returns whether the provided authenticator is compliant with the policy of the server.
If an authenticator that is not policy compliant is provided through
aaid(_:)
for registration or authentication operations, anNMAOperationError
will be returned as a result of the operation.Declaration
Swift
func isPolicyCompliant(authenticatorAaid: String) -> Bool
Parameters
authenticatorAaid
the AAID of the
NMAAuthenticator
.Return Value
true
if the authenticator is compliant with the policy,false
otherwise.