Class PasskeyVerifier.Expectation
java.lang.Object
com.iizix.server.user.passkey.PasskeyVerifier.Expectation
- Enclosing class:
PasskeyVerifier
What the server expects of a ceremony.
- Author:
- Christopher Mindus
Field Summary
FieldsModifier and TypeFieldDescriptionThe COSE algorithms offered to the authenticator.The exact origins a credential may come from, e.g.final StringThe relying party ID of the application.final booleanFlag for user verification: the UV flag must be set.Constructor Summary
ConstructorsMethod Summary
Modifier and TypeMethodDescriptionbooleanisOriginAccepted(String origin) Checks if an origin is accepted.
Field Details
rpId
The relying party ID of the application.origins
userVerification
public final boolean userVerificationFlag for user verification: the UV flag must be set.algorithms
Constructor Details
Expectation
public Expectation(byte[] challenge, String rpId, Set<String> origins, boolean userVerification, Set<Integer> algorithms) Creates the expectation.- Parameters:
challenge- The challenge the server made, 16 bytes at least.rpId- The relying party ID.origins- The exact origins accepted. For the relying party IDlocalhostevery originhttp://localhostandhttps://localhost, with any port, is accepted as well.userVerification- Flag for user verification required.algorithms- The COSE algorithms offered.- Throws:
NullPointerException- If a parameter is null.IllegalArgumentException- If the challenge is shorter than 16 bytes, or the relying party ID is empty.
Method Details
isOriginAccepted
Checks if an origin is accepted.- Parameters:
origin- The origin of the client data.- Returns:
- true when it is one of the origins, or a
localhostorigin of the relying party IDlocalhost.