32
32
/**
33
33
* Used to supply additional parameters when creating a new credential.
34
34
*
35
+ * @since 0.2.0
35
36
* @see <a
36
37
* href="https://www.w3.org/TR/2021/REC-webauthn-2-20210408/#dictdef-publickeycredentialparameters">§5.3.
37
38
* Parameters for Credential Generation (dictionary PublicKeyCredentialParameters) </a>
@@ -44,10 +45,16 @@ public class PublicKeyCredentialParameters {
44
45
* Specifies the cryptographic signature algorithm with which the newly generated credential will
45
46
* be used, and thus also the type of asymmetric key pair to be generated, e.g., RSA or Elliptic
46
47
* Curve.
48
+ *
49
+ * @since 0.2.0
47
50
*/
48
51
@ NonNull private final COSEAlgorithmIdentifier alg ;
49
52
50
- /** Specifies the type of credential to be created. */
53
+ /**
54
+ * Specifies the type of credential to be created.
55
+ *
56
+ * @since 0.2.0
57
+ */
51
58
@ NonNull @ Builder .Default
52
59
private final PublicKeyCredentialType type = PublicKeyCredentialType .PUBLIC_KEY ;
53
60
@@ -61,55 +68,71 @@ private PublicKeyCredentialParameters(
61
68
/**
62
69
* Algorithm {@link COSEAlgorithmIdentifier#EdDSA} and type {@link
63
70
* PublicKeyCredentialType#PUBLIC_KEY}.
71
+ *
72
+ * @since 1.4.0
64
73
*/
65
74
public static final PublicKeyCredentialParameters EdDSA =
66
75
builder ().alg (COSEAlgorithmIdentifier .EdDSA ).build ();
67
76
68
77
/**
69
78
* Algorithm {@link COSEAlgorithmIdentifier#ES256} and type {@link
70
79
* PublicKeyCredentialType#PUBLIC_KEY}.
80
+ *
81
+ * @since 0.3.0
71
82
*/
72
83
public static final PublicKeyCredentialParameters ES256 =
73
84
builder ().alg (COSEAlgorithmIdentifier .ES256 ).build ();
74
85
75
86
/**
76
87
* Algorithm {@link COSEAlgorithmIdentifier#ES384} and type {@link
77
88
* PublicKeyCredentialType#PUBLIC_KEY}.
89
+ *
90
+ * @since 2.1.0
78
91
*/
79
92
public static final PublicKeyCredentialParameters ES384 =
80
93
builder ().alg (COSEAlgorithmIdentifier .ES384 ).build ();
81
94
82
95
/**
83
96
* Algorithm {@link COSEAlgorithmIdentifier#ES512} and type {@link
84
97
* PublicKeyCredentialType#PUBLIC_KEY}.
98
+ *
99
+ * @since 2.1.0
85
100
*/
86
101
public static final PublicKeyCredentialParameters ES512 =
87
102
builder ().alg (COSEAlgorithmIdentifier .ES512 ).build ();
88
103
89
104
/**
90
105
* Algorithm {@link COSEAlgorithmIdentifier#RS1} and type {@link
91
106
* PublicKeyCredentialType#PUBLIC_KEY}.
107
+ *
108
+ * @since 1.5.0
92
109
*/
93
110
public static final PublicKeyCredentialParameters RS1 =
94
111
builder ().alg (COSEAlgorithmIdentifier .RS1 ).build ();
95
112
96
113
/**
97
114
* Algorithm {@link COSEAlgorithmIdentifier#RS256} and type {@link
98
115
* PublicKeyCredentialType#PUBLIC_KEY}.
116
+ *
117
+ * @since 0.3.0
99
118
*/
100
119
public static final PublicKeyCredentialParameters RS256 =
101
120
builder ().alg (COSEAlgorithmIdentifier .RS256 ).build ();
102
121
103
122
/**
104
123
* Algorithm {@link COSEAlgorithmIdentifier#RS384} and type {@link
105
124
* PublicKeyCredentialType#PUBLIC_KEY}.
125
+ *
126
+ * @since 2.4.0
106
127
*/
107
128
public static final PublicKeyCredentialParameters RS384 =
108
129
builder ().alg (COSEAlgorithmIdentifier .RS384 ).build ();
109
130
110
131
/**
111
132
* Algorithm {@link COSEAlgorithmIdentifier#RS512} and type {@link
112
133
* PublicKeyCredentialType#PUBLIC_KEY}.
134
+ *
135
+ * @since 2.4.0
113
136
*/
114
137
public static final PublicKeyCredentialParameters RS512 =
115
138
builder ().alg (COSEAlgorithmIdentifier .RS512 ).build ();
@@ -127,6 +150,7 @@ public static class MandatoryStages {
127
150
* {@link PublicKeyCredentialParametersBuilder#alg(COSEAlgorithmIdentifier) alg} is a required
128
151
* parameter.
129
152
*
153
+ * @since 0.3.0
130
154
* @see PublicKeyCredentialParametersBuilder#alg(COSEAlgorithmIdentifier)
131
155
*/
132
156
public PublicKeyCredentialParametersBuilder alg (COSEAlgorithmIdentifier alg ) {
0 commit comments