Signed-off-by: Andreas Asplund <andreas@asplund.biz>
@ -17,6 +17,7 @@
package org.springframework.security.web.webauthn.api;
import java.io.Serial;
import java.util.Objects;
import org.jspecify.annotations.Nullable;
@ -135,6 +136,19 @@ public final class ImmutablePublicKeyCredentialUserEntity implements PublicKeyCr
return new PublicKeyCredentialUserEntityBuilder();
}
@Override
public boolean equals(Object obj) {
if (!(obj instanceof ImmutablePublicKeyCredentialUserEntity that)) {
return false;
return Objects.equals(getName(), that.getName()) && Objects.equals(getId(), that.getId());
public int hashCode() {
return Objects.hash(getName(), getId());
/**
* Used to build {@link PublicKeyCredentialUserEntity}.
*