diff --git a/core/src/main/java/org/springframework/security/authorization/RequiredFactor.java b/core/src/main/java/org/springframework/security/authorization/RequiredFactor.java index b6ff187c78..5c477bb34e 100644 --- a/core/src/main/java/org/springframework/security/authorization/RequiredFactor.java +++ b/core/src/main/java/org/springframework/security/authorization/RequiredFactor.java @@ -122,7 +122,7 @@ public final class RequiredFactor { * @param authority the authority. * @return the builder. */ - public Builder authority(String authority) { + public Builder authority(@Nullable String authority) { this.authority = authority; return this; } @@ -205,7 +205,7 @@ public final class RequiredFactor { * @param validDuration the {@link Duration}. * @return */ - public Builder validDuration(Duration validDuration) { + public Builder validDuration(@Nullable Duration validDuration) { this.validDuration = validDuration; return this; } diff --git a/webauthn/src/main/java/org/springframework/security/web/webauthn/api/AuthenticatorAssertionResponse.java b/webauthn/src/main/java/org/springframework/security/web/webauthn/api/AuthenticatorAssertionResponse.java index e4b46e0ff3..a29e1c22f6 100644 --- a/webauthn/src/main/java/org/springframework/security/web/webauthn/api/AuthenticatorAssertionResponse.java +++ b/webauthn/src/main/java/org/springframework/security/web/webauthn/api/AuthenticatorAssertionResponse.java @@ -155,7 +155,7 @@ public final class AuthenticatorAssertionResponse extends AuthenticatorResponse * @param authenticatorData the authenticator data. * @return the {@link AuthenticatorAssertionResponseBuilder} */ - public AuthenticatorAssertionResponseBuilder authenticatorData(Bytes authenticatorData) { + public AuthenticatorAssertionResponseBuilder authenticatorData(@Nullable Bytes authenticatorData) { this.authenticatorData = authenticatorData; return this; } @@ -165,7 +165,7 @@ public final class AuthenticatorAssertionResponse extends AuthenticatorResponse * @param signature the signature * @return the {@link AuthenticatorAssertionResponseBuilder} */ - public AuthenticatorAssertionResponseBuilder signature(Bytes signature) { + public AuthenticatorAssertionResponseBuilder signature(@Nullable Bytes signature) { this.signature = signature; return this; } @@ -175,7 +175,7 @@ public final class AuthenticatorAssertionResponse extends AuthenticatorResponse * @param userHandle the user handle * @return the {@link AuthenticatorAssertionResponseBuilder} */ - public AuthenticatorAssertionResponseBuilder userHandle(Bytes userHandle) { + public AuthenticatorAssertionResponseBuilder userHandle(@Nullable Bytes userHandle) { this.userHandle = userHandle; return this; } @@ -185,7 +185,7 @@ public final class AuthenticatorAssertionResponse extends AuthenticatorResponse * @param attestationObject the attestation object * @return the {@link AuthenticatorAssertionResponseBuilder} */ - public AuthenticatorAssertionResponseBuilder attestationObject(Bytes attestationObject) { + public AuthenticatorAssertionResponseBuilder attestationObject(@Nullable Bytes attestationObject) { this.attestationObject = attestationObject; return this; } @@ -195,7 +195,7 @@ public final class AuthenticatorAssertionResponse extends AuthenticatorResponse * @param clientDataJSON the client data JSON * @return the {@link AuthenticatorAssertionResponseBuilder} */ - public AuthenticatorAssertionResponseBuilder clientDataJSON(Bytes clientDataJSON) { + public AuthenticatorAssertionResponseBuilder clientDataJSON(@Nullable Bytes clientDataJSON) { this.clientDataJSON = clientDataJSON; return this; } diff --git a/webauthn/src/main/java/org/springframework/security/web/webauthn/api/AuthenticatorAttestationResponse.java b/webauthn/src/main/java/org/springframework/security/web/webauthn/api/AuthenticatorAttestationResponse.java index a711f411b8..44a1e234f1 100644 --- a/webauthn/src/main/java/org/springframework/security/web/webauthn/api/AuthenticatorAttestationResponse.java +++ b/webauthn/src/main/java/org/springframework/security/web/webauthn/api/AuthenticatorAttestationResponse.java @@ -120,7 +120,7 @@ public final class AuthenticatorAttestationResponse extends AuthenticatorRespons * @param transports the transports * @return the {@link AuthenticatorAttestationResponseBuilder} */ - public AuthenticatorAttestationResponseBuilder transports(List transports) { + public AuthenticatorAttestationResponseBuilder transports(@Nullable List transports) { this.transports = transports; return this; } diff --git a/webauthn/src/main/java/org/springframework/security/web/webauthn/api/AuthenticatorSelectionCriteria.java b/webauthn/src/main/java/org/springframework/security/web/webauthn/api/AuthenticatorSelectionCriteria.java index d36ee1f6a6..a67948fe30 100644 --- a/webauthn/src/main/java/org/springframework/security/web/webauthn/api/AuthenticatorSelectionCriteria.java +++ b/webauthn/src/main/java/org/springframework/security/web/webauthn/api/AuthenticatorSelectionCriteria.java @@ -133,7 +133,7 @@ public final class AuthenticatorSelectionCriteria { * @return the {@link AuthenticatorSelectionCriteriaBuilder} */ public AuthenticatorSelectionCriteriaBuilder authenticatorAttachment( - AuthenticatorAttachment authenticatorAttachment) { + @Nullable AuthenticatorAttachment authenticatorAttachment) { this.authenticatorAttachment = authenticatorAttachment; return this; } @@ -143,7 +143,7 @@ public final class AuthenticatorSelectionCriteria { * @param residentKey the resident key * @return the {@link AuthenticatorSelectionCriteriaBuilder} */ - public AuthenticatorSelectionCriteriaBuilder residentKey(ResidentKeyRequirement residentKey) { + public AuthenticatorSelectionCriteriaBuilder residentKey(@Nullable ResidentKeyRequirement residentKey) { this.residentKey = residentKey; return this; } @@ -153,7 +153,8 @@ public final class AuthenticatorSelectionCriteria { * @param userVerification the user verification requirement * @return the {@link AuthenticatorSelectionCriteriaBuilder} */ - public AuthenticatorSelectionCriteriaBuilder userVerification(UserVerificationRequirement userVerification) { + public AuthenticatorSelectionCriteriaBuilder userVerification( + @Nullable UserVerificationRequirement userVerification) { this.userVerification = userVerification; return this; } diff --git a/webauthn/src/main/java/org/springframework/security/web/webauthn/api/ImmutablePublicKeyCredentialUserEntity.java b/webauthn/src/main/java/org/springframework/security/web/webauthn/api/ImmutablePublicKeyCredentialUserEntity.java index 2ca0fd3a7d..44d2880284 100644 --- a/webauthn/src/main/java/org/springframework/security/web/webauthn/api/ImmutablePublicKeyCredentialUserEntity.java +++ b/webauthn/src/main/java/org/springframework/security/web/webauthn/api/ImmutablePublicKeyCredentialUserEntity.java @@ -179,7 +179,7 @@ public final class ImmutablePublicKeyCredentialUserEntity implements PublicKeyCr * @param displayName the display name * @return the {@link PublicKeyCredentialUserEntityBuilder} */ - public PublicKeyCredentialUserEntityBuilder displayName(String displayName) { + public PublicKeyCredentialUserEntityBuilder displayName(@Nullable String displayName) { this.displayName = displayName; return this; } diff --git a/webauthn/src/main/java/org/springframework/security/web/webauthn/api/PublicKeyCredential.java b/webauthn/src/main/java/org/springframework/security/web/webauthn/api/PublicKeyCredential.java index fa8cc99663..bba7692e8a 100644 --- a/webauthn/src/main/java/org/springframework/security/web/webauthn/api/PublicKeyCredential.java +++ b/webauthn/src/main/java/org/springframework/security/web/webauthn/api/PublicKeyCredential.java @@ -176,7 +176,7 @@ public final class PublicKeyCredential implemen * @param type the type * @return the PublicKeyCredentialBuilder */ - public PublicKeyCredentialBuilder type(PublicKeyCredentialType type) { + public PublicKeyCredentialBuilder type(@Nullable PublicKeyCredentialType type) { this.type = type; return this; } @@ -206,7 +206,8 @@ public final class PublicKeyCredential implemen * @param authenticatorAttachment the authenticator attachment * @return the PublicKeyCredentialBuilder */ - public PublicKeyCredentialBuilder authenticatorAttachment(AuthenticatorAttachment authenticatorAttachment) { + public PublicKeyCredentialBuilder authenticatorAttachment( + @Nullable AuthenticatorAttachment authenticatorAttachment) { this.authenticatorAttachment = authenticatorAttachment; return this; } @@ -217,7 +218,7 @@ public final class PublicKeyCredential implemen * @return the PublicKeyCredentialBuilder */ public PublicKeyCredentialBuilder clientExtensionResults( - AuthenticationExtensionsClientOutputs clientExtensionResults) { + @Nullable AuthenticationExtensionsClientOutputs clientExtensionResults) { this.clientExtensionResults = clientExtensionResults; return this; } diff --git a/webauthn/src/main/java/org/springframework/security/web/webauthn/api/PublicKeyCredentialCreationOptions.java b/webauthn/src/main/java/org/springframework/security/web/webauthn/api/PublicKeyCredentialCreationOptions.java index 0bba299b39..35c1e2f0e0 100644 --- a/webauthn/src/main/java/org/springframework/security/web/webauthn/api/PublicKeyCredentialCreationOptions.java +++ b/webauthn/src/main/java/org/springframework/security/web/webauthn/api/PublicKeyCredentialCreationOptions.java @@ -265,7 +265,7 @@ public final class PublicKeyCredentialCreationOptions { * @param timeout the timeout * @return the PublicKeyCredentialCreationOptionsBuilder */ - public PublicKeyCredentialCreationOptionsBuilder timeout(Duration timeout) { + public PublicKeyCredentialCreationOptionsBuilder timeout(@Nullable Duration timeout) { this.timeout = timeout; return this; } @@ -297,7 +297,8 @@ public final class PublicKeyCredentialCreationOptions { * @param attestation the attestation * @return the PublicKeyCredentialCreationOptionsBuilder */ - public PublicKeyCredentialCreationOptionsBuilder attestation(AttestationConveyancePreference attestation) { + public PublicKeyCredentialCreationOptionsBuilder attestation( + @Nullable AttestationConveyancePreference attestation) { this.attestation = attestation; return this; } @@ -307,7 +308,8 @@ public final class PublicKeyCredentialCreationOptions { * @param extensions the extensions * @return the PublicKeyCredentialCreationOptionsBuilder */ - public PublicKeyCredentialCreationOptionsBuilder extensions(AuthenticationExtensionsClientInputs extensions) { + public PublicKeyCredentialCreationOptionsBuilder extensions( + @Nullable AuthenticationExtensionsClientInputs extensions) { this.extensions = extensions; return this; } diff --git a/webauthn/src/main/java/org/springframework/security/web/webauthn/api/PublicKeyCredentialDescriptor.java b/webauthn/src/main/java/org/springframework/security/web/webauthn/api/PublicKeyCredentialDescriptor.java index afa3802c73..96f4ab9f0b 100644 --- a/webauthn/src/main/java/org/springframework/security/web/webauthn/api/PublicKeyCredentialDescriptor.java +++ b/webauthn/src/main/java/org/springframework/security/web/webauthn/api/PublicKeyCredentialDescriptor.java @@ -124,7 +124,7 @@ public final class PublicKeyCredentialDescriptor implements Serializable { * @param id the id * @return the {@link PublicKeyCredentialDescriptorBuilder} */ - public PublicKeyCredentialDescriptorBuilder id(Bytes id) { + public PublicKeyCredentialDescriptorBuilder id(@Nullable Bytes id) { this.id = id; return this; } @@ -134,7 +134,7 @@ public final class PublicKeyCredentialDescriptor implements Serializable { * @param transports the transports * @return the {@link PublicKeyCredentialDescriptorBuilder} */ - public PublicKeyCredentialDescriptorBuilder transports(Set transports) { + public PublicKeyCredentialDescriptorBuilder transports(@Nullable Set transports) { this.transports = transports; return this; } diff --git a/webauthn/src/main/java/org/springframework/security/web/webauthn/api/PublicKeyCredentialRequestOptions.java b/webauthn/src/main/java/org/springframework/security/web/webauthn/api/PublicKeyCredentialRequestOptions.java index efb32c1e24..4d86a9bd3e 100644 --- a/webauthn/src/main/java/org/springframework/security/web/webauthn/api/PublicKeyCredentialRequestOptions.java +++ b/webauthn/src/main/java/org/springframework/security/web/webauthn/api/PublicKeyCredentialRequestOptions.java @@ -169,7 +169,7 @@ public final class PublicKeyCredentialRequestOptions implements Serializable { * @param challenge the challenge * @return the {@link PublicKeyCredentialRequestOptionsBuilder} */ - public PublicKeyCredentialRequestOptionsBuilder challenge(Bytes challenge) { + public PublicKeyCredentialRequestOptionsBuilder challenge(@Nullable Bytes challenge) { this.challenge = challenge; return this; } @@ -190,7 +190,7 @@ public final class PublicKeyCredentialRequestOptions implements Serializable { * @param rpId the rpId property * @return the {@link PublicKeyCredentialRequestOptionsBuilder} */ - public PublicKeyCredentialRequestOptionsBuilder rpId(String rpId) { + public PublicKeyCredentialRequestOptionsBuilder rpId(@Nullable String rpId) { this.rpId = rpId; return this; } @@ -212,7 +212,8 @@ public final class PublicKeyCredentialRequestOptions implements Serializable { * @param userVerification the user verification * @return the {@link PublicKeyCredentialRequestOptionsBuilder} */ - public PublicKeyCredentialRequestOptionsBuilder userVerification(UserVerificationRequirement userVerification) { + public PublicKeyCredentialRequestOptionsBuilder userVerification( + @Nullable UserVerificationRequirement userVerification) { this.userVerification = userVerification; return this; } diff --git a/webauthn/src/main/java/org/springframework/security/web/webauthn/api/PublicKeyCredentialRpEntity.java b/webauthn/src/main/java/org/springframework/security/web/webauthn/api/PublicKeyCredentialRpEntity.java index 4caf4f6eee..6a817c205c 100644 --- a/webauthn/src/main/java/org/springframework/security/web/webauthn/api/PublicKeyCredentialRpEntity.java +++ b/webauthn/src/main/java/org/springframework/security/web/webauthn/api/PublicKeyCredentialRpEntity.java @@ -91,7 +91,7 @@ public final class PublicKeyCredentialRpEntity { * @param name the name property * @return the {@link PublicKeyCredentialRpEntityBuilder} */ - public PublicKeyCredentialRpEntityBuilder name(String name) { + public PublicKeyCredentialRpEntityBuilder name(@Nullable String name) { this.name = name; return this; } @@ -101,7 +101,7 @@ public final class PublicKeyCredentialRpEntity { * @param id the id * @return the {@link PublicKeyCredentialRpEntityBuilder} */ - public PublicKeyCredentialRpEntityBuilder id(String id) { + public PublicKeyCredentialRpEntityBuilder id(@Nullable String id) { this.id = id; return this; }