public class U2fPrimitives
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
AUTHENTICATE_TYP |
static java.lang.String |
REGISTER_TYPE |
static java.lang.String |
U2F_VERSION |
Constructor and Description |
---|
U2fPrimitives() |
U2fPrimitives(Crypto crypto,
ChallengeGenerator challengeGenerator) |
Modifier and Type | Method and Description |
---|---|
void |
finishAuthentication(AuthenticateRequest authenticateRequest,
AuthenticateResponse response,
DeviceRegistration deviceRegistration) |
void |
finishAuthentication(AuthenticateRequest authenticateRequest,
AuthenticateResponse response,
DeviceRegistration deviceRegistration,
java.util.Set<java.lang.String> facets)
Finishes a previously started authentication.
|
DeviceRegistration |
finishRegistration(RegisterRequest registerRequest,
RegisterResponse response) |
DeviceRegistration |
finishRegistration(RegisterRequest registerRequest,
RegisterResponse response,
java.util.Set<java.lang.String> facets)
Finishes a previously started registration.
|
AuthenticateRequest |
startAuthentication(java.lang.String appId,
DeviceRegistration deviceRegistration)
Initiates the authentication process.
|
AuthenticateRequest |
startAuthentication(java.lang.String appId,
DeviceRegistration deviceRegistration,
byte[] challenge)
Initiates the authentication process.
|
RegisterRequest |
startRegistration(java.lang.String appId) |
RegisterRequest |
startRegistration(java.lang.String appId,
byte[] challenge)
Initiates the registration of a device.
|
public static final java.lang.String AUTHENTICATE_TYP
public static final java.lang.String REGISTER_TYPE
public static final java.lang.String U2F_VERSION
public U2fPrimitives(Crypto crypto, ChallengeGenerator challengeGenerator)
public U2fPrimitives()
public RegisterRequest startRegistration(java.lang.String appId)
startRegistration(String, byte[])
public RegisterRequest startRegistration(java.lang.String appId, byte[] challenge)
appId
- the U2F AppID. Set this to the Web Origin of the login page, unless you need to
support logging in from multiple Web Origins.challenge
- the challenge to usepublic DeviceRegistration finishRegistration(RegisterRequest registerRequest, RegisterResponse response) throws U2fException
public DeviceRegistration finishRegistration(RegisterRequest registerRequest, RegisterResponse response, java.util.Set<java.lang.String> facets) throws U2fException
registerRequest
- response
- the response from the device/client.U2fException
public AuthenticateRequest startAuthentication(java.lang.String appId, DeviceRegistration deviceRegistration)
public AuthenticateRequest startAuthentication(java.lang.String appId, DeviceRegistration deviceRegistration, byte[] challenge)
appId
- the U2F AppID. Set this to the Web Origin of the login page, unless you need to
support logging in from multiple Web Origins.deviceRegistration
- the DeviceRegistration for which to initiate authentication.challenge
- the challenge to usepublic void finishAuthentication(AuthenticateRequest authenticateRequest, AuthenticateResponse response, DeviceRegistration deviceRegistration) throws U2fException
public void finishAuthentication(AuthenticateRequest authenticateRequest, AuthenticateResponse response, DeviceRegistration deviceRegistration, java.util.Set<java.lang.String> facets) throws U2fException
authenticateRequest
- response
- the response from the device/client.U2fException