Package com.yubico.webauthn.data
Class AuthenticatorTransport
- java.lang.Object
-
- com.yubico.webauthn.data.AuthenticatorTransport
-
- All Implemented Interfaces:
com.yubico.internal.util.json.JsonStringSerializable,java.lang.Comparable<AuthenticatorTransport>
public final class AuthenticatorTransport extends java.lang.Object implements java.lang.Comparable<AuthenticatorTransport>, com.yubico.internal.util.json.JsonStringSerializable
Authenticators may communicate with Clients using a variety of transports. This enumeration defines a hint as to how Clients might communicate with a particular Authenticator in order to obtain an assertion for a specific credential. Note that these hints represent the Relying Party's best belief as to how an Authenticator may be reached. A Relying Party may obtain a list of transports hints from some attestation statement formats or via some out-of-band mechanism; it is outside the scope of this specification to define that mechanism.Authenticators may implement various transports for communicating with clients. This enumeration defines hints as to how clients might communicate with a particular authenticator in order to obtain an assertion for a specific credential. Note that these hints represent the WebAuthn Relying Party's best belief as to how an authenticator may be reached. A Relying Party may obtain a list of transports hints from some attestation statement formats or via some out-of-band mechanism; it is outside the scope of the Web Authentication specification to define that mechanism.
-
-
Field Summary
Fields Modifier and Type Field Description static AuthenticatorTransportBLEIndicates the respective authenticator can be contacted over Bluetooth Smart (Bluetooth Low Energy / BLE).static AuthenticatorTransportINTERNALIndicates the respective authenticator is contacted using a client device-specific transport.static AuthenticatorTransportNFCIndicates the respective authenticator can be contacted over Near Field Communication (NFC).static AuthenticatorTransportUSBIndicates the respective authenticator can be contacted over removable USB.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(AuthenticatorTransport other)booleanequals(java.lang.Object o)@NonNull java.lang.StringgetId()inthashCode()static AuthenticatorTransportof(@NonNull java.lang.String id)java.lang.StringtoJsonString()java.lang.StringtoString()static AuthenticatorTransportvalueOf(java.lang.String name)static AuthenticatorTransport[]values()
-
-
-
Field Detail
-
USB
public static final AuthenticatorTransport USB
Indicates the respective authenticator can be contacted over removable USB.
-
NFC
public static final AuthenticatorTransport NFC
Indicates the respective authenticator can be contacted over Near Field Communication (NFC).
-
BLE
public static final AuthenticatorTransport BLE
Indicates the respective authenticator can be contacted over Bluetooth Smart (Bluetooth Low Energy / BLE).
-
INTERNAL
public static final AuthenticatorTransport INTERNAL
Indicates the respective authenticator is contacted using a client device-specific transport. These authenticators are not removable from the client device.
-
-
Method Detail
-
values
public static AuthenticatorTransport[] values()
- Returns:
- An array containing all predefined values of
AuthenticatorTransportknown by this implementation.
-
of
public static AuthenticatorTransport of(@NonNull @NonNull java.lang.String id)
- Returns:
- If
idis the same as that of any ofUSB,NFC,BLEorINTERNAL, returns that constant instance. Otherwise returns a new instance containingid. - See Also:
valueOf(String)
-
valueOf
public static AuthenticatorTransport valueOf(java.lang.String name)
- Returns:
- If
nameequals"USB","NFC","BLE"or"INTERNAL", returns the constant by that name. - Throws:
java.lang.IllegalArgumentException- ifnameis anything else.- See Also:
of(String)
-
toJsonString
public java.lang.String toJsonString()
- Specified by:
toJsonStringin interfacecom.yubico.internal.util.json.JsonStringSerializable
-
compareTo
public int compareTo(AuthenticatorTransport other)
- Specified by:
compareToin interfacejava.lang.Comparable<AuthenticatorTransport>
-
getId
@NonNull public @NonNull java.lang.String getId()
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-