org.openqa.selenium.devtools.v90.webauthn.model.VirtualAuthenticatorOptions Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of selenium-devtools-v90 Show documentation
Show all versions of selenium-devtools-v90 Show documentation
Selenium automates browsers. That's it! What you do with that power is entirely up to you.
package org.openqa.selenium.devtools.v90.webauthn.model;
import org.openqa.selenium.Beta;
import org.openqa.selenium.json.JsonInput;
public class VirtualAuthenticatorOptions {
private final org.openqa.selenium.devtools.v90.webauthn.model.AuthenticatorProtocol protocol;
private final java.util.Optional ctap2Version;
private final org.openqa.selenium.devtools.v90.webauthn.model.AuthenticatorTransport transport;
private final java.util.Optional hasResidentKey;
private final java.util.Optional hasUserVerification;
private final java.util.Optional hasLargeBlob;
private final java.util.Optional automaticPresenceSimulation;
private final java.util.Optional isUserVerified;
public VirtualAuthenticatorOptions(org.openqa.selenium.devtools.v90.webauthn.model.AuthenticatorProtocol protocol, java.util.Optional ctap2Version, org.openqa.selenium.devtools.v90.webauthn.model.AuthenticatorTransport transport, java.util.Optional hasResidentKey, java.util.Optional hasUserVerification, java.util.Optional hasLargeBlob, java.util.Optional automaticPresenceSimulation, java.util.Optional isUserVerified) {
this.protocol = java.util.Objects.requireNonNull(protocol, "protocol is required");
this.ctap2Version = ctap2Version;
this.transport = java.util.Objects.requireNonNull(transport, "transport is required");
this.hasResidentKey = hasResidentKey;
this.hasUserVerification = hasUserVerification;
this.hasLargeBlob = hasLargeBlob;
this.automaticPresenceSimulation = automaticPresenceSimulation;
this.isUserVerified = isUserVerified;
}
public org.openqa.selenium.devtools.v90.webauthn.model.AuthenticatorProtocol getProtocol() {
return protocol;
}
/**
* Defaults to ctap2_0. Ignored if |protocol| == u2f.
*/
public java.util.Optional getCtap2Version() {
return ctap2Version;
}
public org.openqa.selenium.devtools.v90.webauthn.model.AuthenticatorTransport getTransport() {
return transport;
}
/**
* Defaults to false.
*/
public java.util.Optional getHasResidentKey() {
return hasResidentKey;
}
/**
* Defaults to false.
*/
public java.util.Optional getHasUserVerification() {
return hasUserVerification;
}
/**
* If set to true, the authenticator will support the largeBlob extension.
* https://w3c.github.io/webauthn#largeBlob
* Defaults to false.
*/
public java.util.Optional getHasLargeBlob() {
return hasLargeBlob;
}
/**
* If set to true, tests of user presence will succeed immediately.
* Otherwise, they will not be resolved. Defaults to true.
*/
public java.util.Optional getAutomaticPresenceSimulation() {
return automaticPresenceSimulation;
}
/**
* Sets whether User Verification succeeds or fails for an authenticator.
* Defaults to false.
*/
public java.util.Optional getIsUserVerified() {
return isUserVerified;
}
private static VirtualAuthenticatorOptions fromJson(JsonInput input) {
org.openqa.selenium.devtools.v90.webauthn.model.AuthenticatorProtocol protocol = null;
java.util.Optional ctap2Version = java.util.Optional.empty();
org.openqa.selenium.devtools.v90.webauthn.model.AuthenticatorTransport transport = null;
java.util.Optional hasResidentKey = java.util.Optional.empty();
java.util.Optional hasUserVerification = java.util.Optional.empty();
java.util.Optional hasLargeBlob = java.util.Optional.empty();
java.util.Optional automaticPresenceSimulation = java.util.Optional.empty();
java.util.Optional isUserVerified = java.util.Optional.empty();
input.beginObject();
while (input.hasNext()) {
switch(input.nextName()) {
case "protocol":
protocol = input.read(org.openqa.selenium.devtools.v90.webauthn.model.AuthenticatorProtocol.class);
break;
case "ctap2Version":
ctap2Version = java.util.Optional.ofNullable(input.read(org.openqa.selenium.devtools.v90.webauthn.model.Ctap2Version.class));
break;
case "transport":
transport = input.read(org.openqa.selenium.devtools.v90.webauthn.model.AuthenticatorTransport.class);
break;
case "hasResidentKey":
hasResidentKey = java.util.Optional.ofNullable(input.nextBoolean());
break;
case "hasUserVerification":
hasUserVerification = java.util.Optional.ofNullable(input.nextBoolean());
break;
case "hasLargeBlob":
hasLargeBlob = java.util.Optional.ofNullable(input.nextBoolean());
break;
case "automaticPresenceSimulation":
automaticPresenceSimulation = java.util.Optional.ofNullable(input.nextBoolean());
break;
case "isUserVerified":
isUserVerified = java.util.Optional.ofNullable(input.nextBoolean());
break;
default:
input.skipValue();
break;
}
}
input.endObject();
return new VirtualAuthenticatorOptions(protocol, ctap2Version, transport, hasResidentKey, hasUserVerification, hasLargeBlob, automaticPresenceSimulation, isUserVerified);
}
}