Skip to content

Commit

Permalink
PR fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamVe committed Oct 4, 2023
1 parent 61888bf commit b35440f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public static AuthenticatorAssertionResponse fromMap(
deserializeBytes(Objects.requireNonNull(map.get(CLIENT_DATA_JSON)), serializationType),
deserializeBytes(Objects.requireNonNull(map.get(AUTHENTICATOR_DATA)), serializationType),
deserializeBytes(Objects.requireNonNull(map.get(SIGNATURE)), serializationType),
deserializeBytes(Objects.requireNonNull(map.get(USER_HANDLE)), serializationType));
deserializeBytes(map.get(USER_HANDLE), serializationType));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,11 @@ public boolean equals(Object o) {
return false;
}

if ((extensions != null && that.extensions == null) ||
(extensions == null && that.extensions != null)) {
return false;
}

return Arrays.equals(rawData, that.rawData);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,6 @@ public Extensions getExtensions() {
return map;
}

public Map<String, ?> toMap() {
return toMap(SerializationType.DEFAULT);
}

@SuppressWarnings("unchecked")
public static PublicKeyCredentialCreationOptions fromMap(
Map<String, ?> map,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public static PublicKeyCredentialRequestOptions fromMap(Map<String, ?> map, Seri
Number timeout = ((Number) map.get(TIMEOUT));

return new PublicKeyCredentialRequestOptions(
Objects.requireNonNull(deserializeBytes(map.get(CHALLENGE), serializationType)),
deserializeBytes(Objects.requireNonNull(map.get(CHALLENGE)), serializationType),
timeout == null ? null : timeout.longValue(),
(String) map.get(RP_ID),
allowCredentials,
Expand Down

0 comments on commit b35440f

Please sign in to comment.