Exemplo n.º 1
0
 /**
  * Initiates a high-level registration of a device, given a set of already registered devices.
  *
  * @param 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.
  * @param devices the devices currently registered to the user.
  * @return a RegisterRequestData, which should be sent to the client and temporarily saved by the
  *     server.
  */
 public RegisterRequestData startRegistration(
     String appId, Iterable<? extends DeviceRegistration> devices) {
   if (validateAppId) {
     AppId.checkIsValid(appId);
   }
   return new RegisterRequestData(appId, devices, primitives, challengeGenerator);
 }
Exemplo n.º 2
0
 public AuthenticateRequestData startAuthentication(
     String appId, Iterable<? extends DeviceRegistration> devices)
     throws U2fBadInputException, NoEligableDevicesException {
   if (validateAppId) {
     AppId.checkIsValid(appId);
   }
   return new AuthenticateRequestData(appId, devices, primitives, challengeGenerator);
 }