Skip to content

Commit 4070bad

Browse files
committed
Add experimental feature annotations
1 parent c59ce2f commit 4070bad

File tree

6 files changed

+85
-5
lines changed

6 files changed

+85
-5
lines changed

webauthn-server-core/src/main/java/com/yubico/webauthn/AssertionResultV2.java

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,13 @@
4242
import lombok.NonNull;
4343
import lombok.Value;
4444

45-
/** The result of a call to {@link RelyingPartyV2#finishAssertion(FinishAssertionOptions)}. */
45+
/**
46+
* The result of a call to {@link RelyingPartyV2#finishAssertion(FinishAssertionOptions)}.
47+
*
48+
* @deprecated EXPERIMENTAL: This is an experimental feature. It is likely to change or be deleted
49+
* before reaching a mature release.
50+
*/
51+
@Deprecated
4652
@Value
4753
public class AssertionResultV2<C extends CredentialRecord> {
4854

@@ -65,8 +71,11 @@ public class AssertionResultV2<C extends CredentialRecord> {
6571
* <i>before</i> the assertion operation, not the new state. When updating your database state,
6672
* use the signature counter and backup state from {@link #getSignatureCount()}, {@link
6773
* #isBackupEligible()} and {@link #isBackedUp()} instead.
74+
*
75+
* @deprecated EXPERIMENTAL: This is an experimental feature. It is likely to change or be deleted
76+
* before reaching a mature release.
6877
*/
69-
private final C credential;
78+
@Deprecated private final C credential;
7079

7180
/**
7281
* <code>true</code> if and only if at least one of the following is true:

webauthn-server-core/src/main/java/com/yubico/webauthn/CredentialRecord.java

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,28 +8,66 @@
88

99
/**
1010
* @see <a href="https://w3c.github.io/webauthn/#credential-record">Credential Record</a>
11+
* @deprecated EXPERIMENTAL: This is an experimental feature. It is likely to change or be deleted
12+
* before reaching a mature release.
1113
*/
14+
@Deprecated
1215
public interface CredentialRecord {
1316

17+
/**
18+
* @deprecated EXPERIMENTAL: This is an experimental feature. It is likely to change or be deleted
19+
* before reaching a mature release.
20+
*/
21+
@Deprecated
1422
@NonNull
1523
ByteArray getCredentialId();
1624

25+
/**
26+
* @deprecated EXPERIMENTAL: This is an experimental feature. It is likely to change or be deleted
27+
* before reaching a mature release.
28+
*/
29+
@Deprecated
1730
@NonNull
1831
ByteArray getUserHandle();
1932

33+
/**
34+
* @deprecated EXPERIMENTAL: This is an experimental feature. It is likely to change or be deleted
35+
* before reaching a mature release.
36+
*/
37+
@Deprecated
2038
@NonNull
2139
ByteArray getPublicKeyCose();
2240

41+
/**
42+
* @deprecated EXPERIMENTAL: This is an experimental feature. It is likely to change or be deleted
43+
* before reaching a mature release.
44+
*/
45+
@Deprecated
2346
long getSignatureCount();
2447

48+
/**
49+
* @deprecated EXPERIMENTAL: This is an experimental feature. It is likely to change or be deleted
50+
* before reaching a mature release.
51+
*/
52+
@Deprecated
2553
@NonNull
2654
default Optional<Set<AuthenticatorTransport>> getTransports() {
2755
return Optional.empty();
2856
}
2957

3058
// boolean isUvInitialized();
3159

60+
/**
61+
* @deprecated EXPERIMENTAL: This is an experimental feature. It is likely to change or be deleted
62+
* before reaching a mature release.
63+
*/
64+
@Deprecated
3265
Optional<Boolean> isBackupEligible();
3366

67+
/**
68+
* @deprecated EXPERIMENTAL: This is an experimental feature. It is likely to change or be deleted
69+
* before reaching a mature release.
70+
*/
71+
@Deprecated
3472
Optional<Boolean> isBackedUp();
3573
}

webauthn-server-core/src/main/java/com/yubico/webauthn/CredentialRepositoryV2.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,11 @@
3535
* <p>This is used by {@link RelyingParty} to look up credentials and credential IDs.
3636
*
3737
* <p>Unlike {@link CredentialRepository}, this interface does not require support for usernames.
38+
*
39+
* @deprecated EXPERIMENTAL: This is an experimental feature. It is likely to change or be deleted
40+
* before reaching a mature release.
3841
*/
42+
@Deprecated
3943
public interface CredentialRepositoryV2<C extends CredentialRecord> {
4044

4145
/**
@@ -47,7 +51,10 @@ public interface CredentialRepositoryV2<C extends CredentialRecord> {
4751
* @return a {@link Set} containing one {@link PublicKeyCredentialDescriptor} for each credential
4852
* registered to the given user. The set MUST NOT be null, but MAY be empty if the user does
4953
* not exist or has no credentials.
54+
* @deprecated EXPERIMENTAL: This is an experimental feature. It is likely to change or be deleted
55+
* before reaching a mature release.
5056
*/
57+
@Deprecated
5158
Set<PublicKeyCredentialDescriptor> getCredentialIdsForUserHandle(ByteArray userHandle);
5259

5360
/**
@@ -61,7 +68,10 @@ public interface CredentialRepositoryV2<C extends CredentialRecord> {
6168
* credential with credential ID <code>credentialId</code>, if any. If the credential does not
6269
* exist or is registered to a different user handle than <code>userHandle</code>, return
6370
* {@link Optional#empty()}.
71+
* @deprecated EXPERIMENTAL: This is an experimental feature. It is likely to change or be deleted
72+
* before reaching a mature release.
6473
*/
74+
@Deprecated
6575
Optional<C> lookup(ByteArray credentialId, ByteArray userHandle);
6676

6777
/**
@@ -72,6 +82,9 @@ public interface CredentialRepositoryV2<C extends CredentialRecord> {
7282
*
7383
* @return <code>true</code> if and only if the credential database contains at least one
7484
* credential with the given credential ID.
85+
* @deprecated EXPERIMENTAL: This is an experimental feature. It is likely to change or be deleted
86+
* before reaching a mature release.
7587
*/
88+
@Deprecated
7689
boolean credentialIdExists(ByteArray credentialId);
7790
}

webauthn-server-core/src/main/java/com/yubico/webauthn/RelyingParty.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,10 @@ public RelyingPartyBuilder credentialRepository(CredentialRepository credentialR
609609
* credentialRepository} is a required parameter.
610610
*
611611
* @see #credentialRepository(CredentialRepository)
612+
* @deprecated EXPERIMENTAL: This is an experimental feature. It is likely to change or be
613+
* deleted before reaching a mature release.
612614
*/
615+
@Deprecated
613616
public <C extends CredentialRecord>
614617
RelyingPartyV2.RelyingPartyV2Builder<C> credentialRepositoryV2(
615618
CredentialRepositoryV2<C> credentialRepository) {

webauthn-server-core/src/main/java/com/yubico/webauthn/RelyingPartyV2.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,13 @@ public class RelyingPartyV2<C extends CredentialRecord> {
139139
*/
140140
@NonNull private final CredentialRepositoryV2<C> credentialRepository;
141141

142-
/** TODO */
143-
private final UsernameRepository usernameRepository;
142+
/**
143+
* TODO
144+
*
145+
* @deprecated EXPERIMENTAL: This is an experimental feature. It is likely to change or be deleted
146+
* before reaching a mature release.
147+
*/
148+
@Deprecated private final UsernameRepository usernameRepository;
144149

145150
/**
146151
* The extension input to set for the <code>appid</code> and <code>appidExclude</code> extensions.

webauthn-server-core/src/main/java/com/yubico/webauthn/UsernameRepository.java

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,12 @@
3030
/**
3131
* An abstraction of optional database lookups needed by this library.
3232
*
33-
* <p>This is used by {@link RelyingParty} to look up usernames and user handles.
33+
* <p>This is used by {@link RelyingPartyV2} to look up usernames and user handles.
34+
*
35+
* @deprecated EXPERIMENTAL: This is an experimental feature. It is likely to change or be deleted
36+
* before reaching a mature release.
3437
*/
38+
@Deprecated
3539
public interface UsernameRepository {
3640

3741
/**
@@ -40,7 +44,11 @@ public interface UsernameRepository {
4044
*
4145
* <p>Used to look up the user handle based on the username, for authentication ceremonies where
4246
* the username is already given.
47+
*
48+
* @deprecated EXPERIMENTAL: This is an experimental feature. It is likely to change or be deleted
49+
* before reaching a mature release.
4350
*/
51+
@Deprecated
4452
Optional<ByteArray> getUserHandleForUsername(String username);
4553

4654
/**
@@ -49,6 +57,10 @@ public interface UsernameRepository {
4957
*
5058
* <p>Used to look up the username based on the user handle, for username-less authentication
5159
* ceremonies.
60+
*
61+
* @deprecated EXPERIMENTAL: This is an experimental feature. It is likely to change or be deleted
62+
* before reaching a mature release.
5263
*/
64+
@Deprecated
5365
Optional<String> getUsernameForUserHandle(ByteArray userHandle);
5466
}

0 commit comments

Comments
 (0)