DefaultDeviceAuthenticator
open class DefaultDeviceAuthenticator : DeviceAuthenticator
-
Generate public and private key pair
Declaration
Swift
open func generateKeys() throws -> FRCore.KeyPair -
Check if authentication is supported
Declaration
Swift
open func isSupported() -> Bool -
Access Control for the authetication type
Declaration
Swift
open func accessControl() -> SecAccessControl? -
Get the Device Binding Authentication Type
Declaration
Swift
open func type() -> DeviceBindingAuthenticationType -
Remove Keys
Declaration
Swift
open func deleteKeys() -
Default implemention Sign the challenge sent from the server and generate signed JWT
Throws
DeviceBindingStatusif any error occurs while signingDeclaration
Swift
open func sign(keyPair: KeyPair, kid: String, userId: String, challenge: String, expiration: Date) throws -> StringParameters
keyPairPublic and private key pair
kidGenerated key id
userIduser Id received from server
challengechallenge received from server
expirationexperation Date of jws
Return Value
compact serialized jws
-
Sign the challenge sent from the server and generate signed JWT
Throws
DeviceBindingStatusif any error occurs while signingDeclaration
Swift
open func sign(userKey: UserKey, challenge: String, expiration: Date, customClaims: [String : Any] = [:]) throws -> StringParameters
userKeyuser Information
challengechallenge received from server
expirationexperation Date of jws
customClaimsA dictionary of custom claims to be added to the jws payload
Return Value
compact serialized jws
-
Set the Authentication Prompt
Declaration
Swift
open func setPrompt(_ prompt: Prompt) -
initialize already created entity with useriD and Promp
Declaration
Swift
open func initialize(userId: String, prompt: Prompt)Parameters
userIduserId of the authentication
promptPrompt containing the description for authentication
-
initialize already created entity with useriD and Promp
Declaration
Swift
open func initialize(userId: String)Parameters
userIduserId of the authentication
-
Get the token signed issue time.
Declaration
Swift
open func issueTime() -> Date -
Get the token not before time.
Declaration
Swift
open func notBeforeTime() -> Date -
Validate custom claims
Declaration
Swift
open func validateCustomClaims(_ customClaims: [String : Any]) -> BoolParameters
customClaimsA dictionary of custom claims to be validated
Return Value
Bool value indicating whether the custom claims are valid or not
View on GitHub