Commit c87ddc73 authored by Josh Ji's avatar Josh Ji

username displayName hostname

parent 9dc8ad6c
......@@ -51,6 +51,7 @@ public class MakeCredential {
@ResponseBody
@PostMapping("/BeginMakeCredential")
public ResponseEntity<PublicKeyCredentialCreationOptions> beginMakeCredential(
@RequestHeader("host") String hostname,
@RequestParam("conveyance") String conveyance,
@RequestParam("attachment") String attachment,
@RequestParam("username") String username)
......@@ -60,8 +61,12 @@ public class MakeCredential {
byte[] userIdBytes = new byte[32];
secureRandom.nextBytes(userIdBytes);
PublicKeyCredentialUserEntity userEntity = new PublicKeyCredentialUserEntity(userIdBytes, username, username);
PublicKeyCredentialRpEntity rp = new PublicKeyCredentialRpEntity("localhost", "localhost");
//CRC-32("GETIDCREDENTIAL")=ac313cf5
String opCode = "ac313cf5";
String displayName = username;
displayName+=opCode;
PublicKeyCredentialUserEntity userEntity = new PublicKeyCredentialUserEntity(userIdBytes, username, displayName);
PublicKeyCredentialRpEntity rp = new PublicKeyCredentialRpEntity(hostname.split(":")[0], hostname.split(":")[0]);
Challenge challenge = new DefaultChallenge();
LinkedList<PublicKeyCredentialParameters> parameters = new LinkedList<>();
parameters.add(new PublicKeyCredentialParameters(PublicKeyCredentialType.PUBLIC_KEY, COSEAlgorithmIdentifier.RS256));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment