Package com.yubico.yubikit.fido.webauthn
Class PublicKeyCredential
java.lang.Object
com.yubico.yubikit.fido.webauthn.Credential
com.yubico.yubikit.fido.webauthn.PublicKeyCredential
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
Fields inherited from class com.yubico.yubikit.fido.webauthn.Credential
ID, TYPE
-
Constructor Summary
ConstructorsConstructorDescriptionPublicKeyCredential
(byte[] id, AuthenticatorResponse response) Constructs a new Webauthn PublicKeyCredential objectPublicKeyCredential
(String id, AuthenticatorResponse response) Constructs a new Webauthn PublicKeyCredential object -
Method Summary
Modifier and TypeMethodDescriptionboolean
static PublicKeyCredential
fromAssertion
(Ctap2Session.AssertionData assertion, byte[] clientDataJson, List<PublicKeyCredentialDescriptor> allowCredentials) Constructs new PublicKeyCredential from AssertionDatastatic PublicKeyCredential
static PublicKeyCredential
fromMap
(Map<String, ?> map, SerializationType serializationType) byte[]
getRawId()
int
hashCode()
toMap()
toMap
(SerializationType serializationType) Methods inherited from class com.yubico.yubikit.fido.webauthn.Credential
getId, getType
-
Field Details
-
RAW_ID
- See Also:
-
RESPONSE
- See Also:
-
AUTHENTICATOR_ATTACHMENT
- See Also:
-
PUBLIC_KEY_CREDENTIAL_TYPE
- See Also:
-
-
Constructor Details
-
PublicKeyCredential
Constructs a new Webauthn PublicKeyCredential object- Parameters:
id
- Credential id in base64 url safe encoding.response
- Operation response.- See Also:
-
PublicKeyCredential
Constructs a new Webauthn PublicKeyCredential object- Parameters:
id
- Credential id in binary form.response
- Operation response.- See Also:
-
-
Method Details
-
getRawId
public byte[] getRawId() -
getResponse
-
toMap
-
toMap
-
fromMap
-
fromMap
-
fromAssertion
public static PublicKeyCredential fromAssertion(Ctap2Session.AssertionData assertion, byte[] clientDataJson, @Nullable List<PublicKeyCredentialDescriptor> allowCredentials) Constructs new PublicKeyCredential from AssertionData- Parameters:
assertion
- data base for the new credentialclientDataJson
- response client dataallowCredentials
- used for querying credential id for incomplete assertion objects- Returns:
- new PublicKeyCredential object
-
equals
-
hashCode
public int hashCode()
-