public class U2fPrimitives extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
AUTHENTICATE_TYP |
static String |
REGISTER_TYPE |
static String |
U2F_VERSION |
| Constructor and Description |
|---|
U2fPrimitives() |
U2fPrimitives(com.yubico.u2f.crypto.Crypto crypto,
com.yubico.u2f.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,
Set<String> facets)
Finishes a previously started authentication.
|
DeviceRegistration |
finishRegistration(RegisterRequest registerRequest,
RegisterResponse response) |
DeviceRegistration |
finishRegistration(RegisterRequest registerRequest,
RegisterResponse response,
Set<String> facets)
Finishes a previously started registration.
|
AuthenticateRequest |
startAuthentication(String appId,
DeviceRegistration deviceRegistration)
Initiates the authentication process.
|
AuthenticateRequest |
startAuthentication(String appId,
DeviceRegistration deviceRegistration,
byte[] challenge)
Initiates the authentication process.
|
RegisterRequest |
startRegistration(String appId) |
RegisterRequest |
startRegistration(String appId,
byte[] challenge)
Initiates the registration of a device.
|
public static final String AUTHENTICATE_TYP
public static final String REGISTER_TYPE
public static final String U2F_VERSION
public U2fPrimitives(com.yubico.u2f.crypto.Crypto crypto,
com.yubico.u2f.crypto.ChallengeGenerator challengeGenerator)
public U2fPrimitives()
public RegisterRequest startRegistration(String appId)
startRegistration(String, byte[])public RegisterRequest startRegistration(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 U2fBadInputException
public DeviceRegistration finishRegistration(RegisterRequest registerRequest, RegisterResponse response, Set<String> facets) throws U2fBadInputException
registerRequest - response - the response from the device/client.U2fBadInputExceptionpublic AuthenticateRequest startAuthentication(String appId, DeviceRegistration deviceRegistration)
public AuthenticateRequest startAuthentication(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 U2fBadInputException, DeviceCompromisedException
public void finishAuthentication(AuthenticateRequest authenticateRequest, AuthenticateResponse response, DeviceRegistration deviceRegistration, Set<String> facets) throws U2fBadInputException, DeviceCompromisedException
authenticateRequest - response - the response from the device/client.U2fBadInputExceptionDeviceCompromisedExceptionCopyright © 2015 Yubico. All Rights Reserved.