RegisterResponse response = new RegisterResponse();
response.challenge = BaseEncoding.base64().encode(challenge.toByteArray());
return response;
}
DomainData domain = identityService.getDefaultDomain();
UserData.Builder b = UserData.newBuilder();
// We allow multiple systems to share an email address
// so we use the public key hash as our unique id
{
ByteString publicKeySha1 = clientCertificate.getPublicKeySha1();
String hex = BaseEncoding.base16().encode(publicKeySha1.toByteArray());
b.setName("__pubkey__" + hex);
}
b.setDomainId(domain.getId());
b.setEnabled(true);
b.setEmail(request.email);