public class BrokenAuthenticator extends java.lang.Object implements Authenticator
Authenticator but always computes an
invalid signature when creating an assertion.| Constructor and Description |
|---|
BrokenAuthenticator(Authenticator basis)
Create a new broken authenticator.
|
| Modifier and Type | Method and Description |
|---|---|
AuthenticatorAssertionData |
getAssertion(java.lang.String rpId,
byte[] hash,
java.util.List<com.yubico.webauthn.data.PublicKeyCredentialDescriptor> allowedCredentialDescriptorList,
boolean requireUserVerification,
byte[] extensions)
Implementation that creates invalid assertions.
|
com.yubico.webauthn.data.AuthenticatorAttachment |
getAttachment()
Returns this authenticator's attachment.
|
com.upokecenter.cbor.CBORObject |
makeCredential(byte[] hash,
com.yubico.webauthn.data.RelyingPartyIdentity rpEntity,
com.yubico.webauthn.data.UserIdentity userEntity,
boolean requireResidentKey,
boolean requireUserVerification,
java.util.List<com.yubico.webauthn.data.PublicKeyCredentialParameters> credTypesAndPubKeyAlgs,
java.util.Set<com.yubico.webauthn.data.PublicKeyCredentialDescriptor> excludeCredentials,
boolean enterpriseAttestationPossible,
byte[] extensions)
Method that will be called by a client platform to create a new credential on this authenticator.
|
boolean |
supportsClientSideDiscoverablePublicKeyCredentialSources()
Returns whether this authenticator supports the creation of client-side discoverable credentials,
also known as resident keys.
|
boolean |
supportsUserVerification()
Returns whether this authenticator can perform user verification.
|
public BrokenAuthenticator(Authenticator basis)
basis - The authenticator that will be used as the basis/delegate of this one.public com.upokecenter.cbor.CBORObject makeCredential(byte[] hash,
com.yubico.webauthn.data.RelyingPartyIdentity rpEntity,
com.yubico.webauthn.data.UserIdentity userEntity,
boolean requireResidentKey,
boolean requireUserVerification,
java.util.List<com.yubico.webauthn.data.PublicKeyCredentialParameters> credTypesAndPubKeyAlgs,
java.util.Set<com.yubico.webauthn.data.PublicKeyCredentialDescriptor> excludeCredentials,
boolean enterpriseAttestationPossible,
byte[] extensions)
throws java.lang.IllegalArgumentException,
java.lang.UnsupportedOperationException,
java.lang.IllegalStateException
AuthenticatormakeCredential in interface Authenticatorhash - The hash of the serialized client data, provided by the client.rpEntity - The Relying Party entityuserEntity - The user account's entity, containing the user handle given by the Relying Party.requireResidentKey - The effective resident key requirement for credential creation, a Boolean value determined by the client.requireUserVerification - The effective user verification requirement for credential creation, a Boolean value determined by the client.credTypesAndPubKeyAlgs - A sequence of credential types and algorithms requested by the Relying Party. This sequence is ordered from most preferred to least preferred.
The authenticator makes a best-effort to create the most preferred credential that it can.excludeCredentials - A nullable list of PublicKeyCredentialDescriptor objects provided by the Relying Party with the intention that,
if any of these are known to the authenticator, it SHOULD NOT create a new credential.
excludeCredentials contains a list of known credentials.enterpriseAttestationPossible - A Boolean value that indicates that individually-identifying attestation MAY be returned by the authenticator.extensions - A CBOR map from extension identifiers to their authenticator extension inputs, created by the client based on the extensions requested by the Relying Party, if any.java.lang.IllegalArgumentException - If the parameters are malformed in any way.java.lang.UnsupportedOperationException - If some requirement was requested that this authenticator does not support.java.lang.IllegalStateException - If the current state of this authenticator prevents it from fulfilling the request.at creation time.
public AuthenticatorAssertionData getAssertion(java.lang.String rpId, byte[] hash, java.util.List<com.yubico.webauthn.data.PublicKeyCredentialDescriptor> allowedCredentialDescriptorList, boolean requireUserVerification, byte[] extensions) throws java.lang.IllegalArgumentException, java.util.NoSuchElementException
getAssertion in interface AuthenticatorrpId - The caller’s RP ID, as determined by the user agent and the client.hash - The hash of the serialized client data, provided by the client.allowedCredentialDescriptorList - A nullable list of PublicKeyCredentialDescriptors describing credentials acceptable to the Relying Party (possibly filtered by the client), if any.requireUserVerification - The effective user verification requirement for assertion, a Boolean value provided by the client.extensions - A CBOR map from extension identifiers to their authenticator extension inputs, created by the client based on the extensions requested by the Relying Party, if any.java.lang.IllegalArgumentException - If the parameters are malformed in any way.java.util.NoSuchElementException - If this authenticator cannot find any matching credential.authenticator set at creation timepublic com.yubico.webauthn.data.AuthenticatorAttachment getAttachment()
AuthenticatorgetAttachment in interface Authenticatorpublic boolean supportsClientSideDiscoverablePublicKeyCredentialSources()
AuthenticatorsupportsClientSideDiscoverablePublicKeyCredentialSources in interface Authenticatorpublic boolean supportsUserVerification()
AuthenticatorsupportsUserVerification in interface Authenticator