Interface DeviceAuthenticator
-
- All Implemented Interfaces:
public interface DeviceAuthenticatorDevice Authenticator Interface
-
-
Method Summary
Modifier and Type Method Description abstract KeyPairgenerateKeys(Context context, Attestation attestation)generate the public and private KeyPair with Challenge abstract DeviceBindingStatusauthenticate(Context context)Authenticate the user to access the Unitprompt(Prompt prompt)Set the Authentication Prompt Stringsign(Context context, KeyPair keyPair, String kid, String userId, String challenge, Date expiration, Attestation attestation)sign the challenge sent from the server and generate signed JWT Stringsign(Context context, UserKey userKey, PrivateKey privateKey, String challenge, Date expiration)sign the challenge sent from the server and generate signed JWT BooleanisSupported(Context context, Attestation attestation)check if supported device binding abstract DeviceBindingAuthenticationTypetype()abstract UnitdeleteKeys(Context context)DategetIssueTime()Get the token signed issue time. DategetNotBeforeTime()Get the token not before time. -
-
Method Detail
-
generateKeys
abstract KeyPair generateKeys(Context context, Attestation attestation)
generate the public and private KeyPair with Challenge
-
authenticate
abstract DeviceBindingStatus authenticate(Context context)
Authenticate the user to access the
-
sign
String sign(Context context, KeyPair keyPair, String kid, String userId, String challenge, Date expiration, Attestation attestation)
sign the challenge sent from the server and generate signed JWT
- Parameters:
keyPair- Public and private keykid- Generated kid from the PreferenceuserId- userId received from serverchallenge- challenge received from server
-
sign
String sign(Context context, UserKey userKey, PrivateKey privateKey, String challenge, Date expiration)
sign the challenge sent from the server and generate signed JWT
- Parameters:
userKey- User Informationchallenge- challenge received from server
-
isSupported
Boolean isSupported(Context context, Attestation attestation)
check if supported device binding
-
type
abstract DeviceBindingAuthenticationType type()
-
deleteKeys
abstract Unit deleteKeys(Context context)
-
getIssueTime
Date getIssueTime()
Get the token signed issue time.
-
getNotBeforeTime
Date getNotBeforeTime()
Get the token not before time.
-
-
-
-