DeviceSigningVerifierCallback
open class DeviceSigningVerifierCallback : MultipleValuesCallback, Binding
Callback to collect the device binding information
-
The userId received from server
Declaration
Swift
public private(set) var userId: String? { get }
-
The challenge received from server
Declaration
Swift
public private(set) var challenge: String { get }
-
Declaration
Swift
public private(set) var title: String { get }
-
Declaration
Swift
public private(set) var subtitle: String { get }
-
Declaration
Swift
public private(set) var promptDescription: String { get }
-
Declaration
Swift
public private(set) var timeout: Int? { get }
-
Designated initialization method for DeviceSigningVerifierCallback
Throws
AuthError.invalidCallbackResponse for invalid callback responseDeclaration
Swift
required public init(json: [String : Any]) throws
Parameters
json
JSON object of DeviceSigningVerifierCallback
-
Sign the challenge with binded device key
Declaration
Swift
open func sign(userKeySelector: UserKeySelector = DefaultUserKeySelector(), deviceAuthenticator: ((DeviceBindingAuthenticationType) -> DeviceAuthenticator)? = nil, customClaims: [String: Any] = [:], prompt: Prompt? = nil, completion: @escaping DeviceSigningResultCallback)
Parameters
userKeySelector
UserKeySelector
implementation - default value isDefaultUserKeySelector()
deviceAuthenticator
method for providing a
DeviceAuthenticator
fromDeviceBindingAuthenticationType
-default value isdeviceAuthenticatorIdentifier
customClaims
A dictionary of custom claims to be added to the jws payload
prompt
Biometric prompt to override the server values
completion
Completion block for Device binding result callback
-
Handle all the errors for the device binding.
Declaration
Swift
open func handleException(status: DeviceBindingStatus, completion: @escaping DeviceSigningResultCallback)
Parameters
status
Device binding status
completion
Completion block Device binding result callback
-
Sets
jws
value in callback responseDeclaration
Swift
public func setJws(_ jws: String)
Parameters
jws
String value of
jws
] -
Sets
clientError
value in callback responseDeclaration
Swift
public func setClientError(_ clientError: String)
Parameters
clientError
String value of
clientError
] -
Declaration
Swift
open func getDeviceAuthenticator(type: DeviceBindingAuthenticationType) -> DeviceAuthenticator
-
Declaration
Swift
open func getExpiration(timeout: Int?) -> Date
-
Declaration
Swift
open var deviceAuthenticatorIdentifier: (DeviceBindingAuthenticationType) -> DeviceAuthenticator { get }