@@ -58,23 +58,54 @@ public class AuthenticatorTransport implements Comparable<AuthenticatorTransport
58
58
59
59
@ JsonValue @ NonNull private final String id ;
60
60
61
- /** Indicates the respective authenticator can be contacted over removable USB. */
61
+ /**
62
+ * Indicates the respective authenticator can be contacted over removable USB.
63
+ *
64
+ * @see <a
65
+ * href="https://www.w3.org/TR/2021/REC-webauthn-2-20210408/#dom-authenticatortransport-usb">5.8.4.
66
+ * Authenticator Transport Enumeration (enum AuthenticatorTransport)</a>
67
+ */
62
68
public static final AuthenticatorTransport USB = new AuthenticatorTransport ("usb" );
63
69
64
70
/**
65
71
* Indicates the respective authenticator can be contacted over Near Field Communication (NFC).
72
+ *
73
+ * @see <a
74
+ * href="https://www.w3.org/TR/2021/REC-webauthn-2-20210408/#dom-authenticatortransport-nfc">5.8.4.
75
+ * Authenticator Transport Enumeration (enum AuthenticatorTransport)</a>
66
76
*/
67
77
public static final AuthenticatorTransport NFC = new AuthenticatorTransport ("nfc" );
68
78
69
79
/**
70
80
* Indicates the respective authenticator can be contacted over Bluetooth Smart (Bluetooth Low
71
81
* Energy / BLE).
82
+ *
83
+ * @see <a
84
+ * href="https://www.w3.org/TR/2021/REC-webauthn-2-20210408/#dom-authenticatortransport-ble">5.8.4.
85
+ * Authenticator Transport Enumeration (enum AuthenticatorTransport)</a>
72
86
*/
73
87
public static final AuthenticatorTransport BLE = new AuthenticatorTransport ("ble" );
74
88
89
+ /**
90
+ * Indicates the respective authenticator can be contacted using a combination of (often separate)
91
+ * data-transport and proximity mechanisms. This supports, for example, authentication on a
92
+ * desktop computer using a smartphone.
93
+ *
94
+ * @deprecated EXPERIMENTAL: This feature is from a not yet mature standard; it could change as
95
+ * the standard matures.
96
+ * @see <a href="https://w3c.github.io/webauthn/#dom-authenticatortransport-hybrid">5.8.4.
97
+ * Authenticator Transport Enumeration (enum AuthenticatorTransport)</a>
98
+ */
99
+ @ Deprecated
100
+ public static final AuthenticatorTransport HYBRID = new AuthenticatorTransport ("hybrid" );
101
+
75
102
/**
76
103
* Indicates the respective authenticator is contacted using a client device-specific transport.
77
104
* These authenticators are not removable from the client device.
105
+ *
106
+ * @see <a
107
+ * href="https://www.w3.org/TR/2021/REC-webauthn-2-20210408/#dom-authenticatortransport-internal">5.8.4.
108
+ * Authenticator Transport Enumeration (enum AuthenticatorTransport)</a>
78
109
*/
79
110
public static final AuthenticatorTransport INTERNAL = new AuthenticatorTransport ("internal" );
80
111
@@ -83,13 +114,13 @@ public class AuthenticatorTransport implements Comparable<AuthenticatorTransport
83
114
* this implementation.
84
115
*/
85
116
public static AuthenticatorTransport [] values () {
86
- return new AuthenticatorTransport [] {USB , NFC , BLE , INTERNAL };
117
+ return new AuthenticatorTransport [] {USB , NFC , BLE , HYBRID , INTERNAL };
87
118
}
88
119
89
120
/**
90
121
* @return If <code>id</code> is the same as that of any of {@link #USB}, {@link #NFC}, {@link
91
- * #BLE} or {@link #INTERNAL}, returns that constant instance. Otherwise returns a new
92
- * instance containing <code>id</code>.
122
+ * #BLE}, {@link #HYBRID} or {@link #INTERNAL}, returns that constant instance. Otherwise
123
+ * returns a new instance containing <code>id</code>.
93
124
* @see #valueOf(String)
94
125
*/
95
126
@ JsonCreator
@@ -101,8 +132,8 @@ public static AuthenticatorTransport of(@NonNull String id) {
101
132
}
102
133
103
134
/**
104
- * @return If <code>name</code> equals <code>"USB"</code>, <code>"NFC"</code>, <code>"BLE"</code>
105
- * or <code>"INTERNAL"</code>, returns the constant by that name.
135
+ * @return If <code>name</code> equals <code>"USB"</code>, <code>"NFC"</code>, <code>"BLE"</code>,
136
+ * <code>"HYBRID"</code> or <code>"INTERNAL"</code>, returns the constant by that name.
106
137
* @throws IllegalArgumentException if <code>name</code> is anything else.
107
138
* @see #of(String)
108
139
*/
@@ -114,6 +145,8 @@ public static AuthenticatorTransport valueOf(String name) {
114
145
return NFC ;
115
146
case "BLE" :
116
147
return BLE ;
148
+ case "HYBRID" :
149
+ return HYBRID ;
117
150
case "INTERNAL" :
118
151
return INTERNAL ;
119
152
default :
0 commit comments