Skip to content

Commit 3a86778

Browse files
authored
Merge pull request #335 from webauthn4j/polish-code
Polish code
2 parents 03bffb7 + 5117d15 commit 3a86778

File tree

110 files changed

+192
-201
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

110 files changed

+192
-201
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ configure(allJavaProjects) {
176176
sourceCompatibility = 1.8
177177

178178
tasks.withType(JavaCompile) {
179-
//options.compilerArgs << "-Xlint:unchecked" //FIXME
179+
options.compilerArgs << "-Xlint:unchecked"
180180
options.compilerArgs << "-Xlint:deprecation"
181181
options.compilerArgs << "-Werror"
182182
}

samples/fido-server-conformance-test-app/src/main/java/com/webauthn4j/springframework/security/webauthn/sample/app/security/SampleUsernameNotFoundHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
public class SampleUsernameNotFoundHandler implements UsernameNotFoundHandler {
2626

27-
private UserManager userManager;
27+
private final UserManager userManager;
2828

2929
public SampleUsernameNotFoundHandler(UserManager userManager) {
3030
this.userManager = userManager;

samples/fido-server-conformance-test-app/src/main/java/com/webauthn4j/springframework/security/webauthn/sample/domain/component/AuthenticatorManagerImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@
2828
@Component
2929
public class AuthenticatorManagerImpl implements AuthenticatorManager {
3030

31-
private Logger logger = LoggerFactory.getLogger(AuthenticatorManagerImpl.class);
31+
private final Logger logger = LoggerFactory.getLogger(AuthenticatorManagerImpl.class);
3232

33-
private AuthenticatorEntityRepository authenticatorEntityRepository;
33+
private final AuthenticatorEntityRepository authenticatorEntityRepository;
3434

3535
public AuthenticatorManagerImpl(AuthenticatorEntityRepository authenticatorEntityRepository) {
3636
this.authenticatorEntityRepository = authenticatorEntityRepository;

samples/fido-server-conformance-test-app/src/main/java/com/webauthn4j/springframework/security/webauthn/sample/domain/component/UserManagerImpl.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@
4646
@Transactional
4747
public class UserManagerImpl implements UserManager, WebAuthnUserDetailsService {
4848

49-
private ModelMapper modelMapper;
49+
private final ModelMapper modelMapper;
5050

51-
private UserEntityRepository userEntityRepository;
52-
private AuthenticatorEntityRepository authenticatorEntityRepository;
51+
private final UserEntityRepository userEntityRepository;
52+
private final AuthenticatorEntityRepository authenticatorEntityRepository;
5353

5454
@Autowired
5555
public UserManagerImpl(ModelMapper mapper, UserEntityRepository userEntityRepository, AuthenticatorEntityRepository authenticatorEntityRepository) {

samples/fido-server-conformance-test-app/src/main/java/com/webauthn4j/springframework/security/webauthn/sample/infrastructure/util/jpa/converter/AttestationStatementConverter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
*/
2929
public class AttestationStatementConverter implements AttributeConverter<AttestationStatement, String> {
3030

31-
private CborConverter cborConverter;
31+
private final CborConverter cborConverter;
3232

3333
public AttestationStatementConverter(ObjectConverter objectConverter) {
3434
this.cborConverter = objectConverter.getCborConverter();

samples/fido-server-conformance-test-app/src/main/java/com/webauthn4j/springframework/security/webauthn/sample/infrastructure/util/jpa/converter/AttestationStatementEnvelope.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public class AttestationStatementEnvelope {
3131
include = JsonTypeInfo.As.EXTERNAL_PROPERTY,
3232
property = "fmt"
3333
)
34-
private AttestationStatement attestationStatement;
34+
private final AttestationStatement attestationStatement;
3535

3636
@JsonCreator
3737
public AttestationStatementEnvelope(@JsonProperty("attStmt") AttestationStatement attestationStatement) {

samples/fido-server-conformance-test-app/src/main/java/com/webauthn4j/springframework/security/webauthn/sample/infrastructure/util/jpa/converter/AuthenticatorExtensionsConverter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
public class AuthenticatorExtensionsConverter implements AttributeConverter<Map<String, RegistrationExtensionAuthenticatorOutput<?>>, String> {
2929

30-
private CborConverter cborConverter;
30+
private final CborConverter cborConverter;
3131

3232
public AuthenticatorExtensionsConverter(ObjectConverter objectConverter) {
3333
this.cborConverter = objectConverter.getCborConverter();

samples/fido-server-conformance-test-app/src/main/java/com/webauthn4j/springframework/security/webauthn/sample/infrastructure/util/jpa/converter/COSEKeyConverter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
@Converter
2828
public class COSEKeyConverter implements AttributeConverter<COSEKey, String> {
2929

30-
private CborConverter cborConverter;
30+
private final CborConverter cborConverter;
3131

3232
public COSEKeyConverter(ObjectConverter objectConverter) {
3333
this.cborConverter = objectConverter.getCborConverter();

samples/fido-server-conformance-test-app/src/main/java/com/webauthn4j/springframework/security/webauthn/sample/infrastructure/util/jpa/converter/ClientExtensionsConverter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
public class ClientExtensionsConverter<T> implements AttributeConverter<Map<String, RegistrationExtensionClientOutput<?>>, String> {
2828

29-
private JsonConverter jsonConverter;
29+
private final JsonConverter jsonConverter;
3030

3131
public ClientExtensionsConverter(ObjectConverter objectConverter) {
3232
this.jsonConverter = objectConverter.getJsonConverter();

samples/spa/src/main/java/com/webauthn4j/springframework/security/webauthn/sample/app/api/validator/AuthenticatorFormValidator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public class AuthenticatorFormValidator {
2929

3030
private static final String NOT_NULL = "not.null";
3131

32-
private WebAuthnRegistrationRequestValidator webAuthnRegistrationRequestValidator;
32+
private final WebAuthnRegistrationRequestValidator webAuthnRegistrationRequestValidator;
3333

3434
public AuthenticatorFormValidator(WebAuthnRegistrationRequestValidator webAuthnRegistrationRequestValidator) {
3535
this.webAuthnRegistrationRequestValidator = webAuthnRegistrationRequestValidator;

samples/spa/src/main/java/com/webauthn4j/springframework/security/webauthn/sample/app/api/validator/spring/ProfileCreateFormValidator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public class ProfileCreateFormValidator implements Validator {
3333
@Autowired
3434
private HttpServletRequest request;
3535

36-
private AuthenticatorFormValidator authenticatorFormValidator;
36+
private final AuthenticatorFormValidator authenticatorFormValidator;
3737

3838
public ProfileCreateFormValidator(AuthenticatorFormValidator authenticatorFormValidator) {
3939
this.authenticatorFormValidator = authenticatorFormValidator;

samples/spa/src/main/java/com/webauthn4j/springframework/security/webauthn/sample/app/api/validator/spring/ProfileUpdateFormValidator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public class ProfileUpdateFormValidator implements Validator {
3333
@Autowired
3434
private HttpServletRequest request;
3535

36-
private AuthenticatorFormValidator authenticatorFormValidator;
36+
private final AuthenticatorFormValidator authenticatorFormValidator;
3737

3838
public ProfileUpdateFormValidator(AuthenticatorFormValidator authenticatorFormValidator) {
3939
this.authenticatorFormValidator = authenticatorFormValidator;

samples/spa/src/main/java/com/webauthn4j/springframework/security/webauthn/sample/app/formatter/CollectedClientDataFormFormatter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
*/
3030
public class CollectedClientDataFormFormatter implements Formatter<CollectedClientDataForm> {
3131

32-
private Base64UrlStringToCollectedClientDataConverter base64UrlStringToCollectedClientDataConverter;
32+
private final Base64UrlStringToCollectedClientDataConverter base64UrlStringToCollectedClientDataConverter;
3333

3434
public CollectedClientDataFormFormatter(Base64UrlStringToCollectedClientDataConverter base64UrlStringToCollectedClientDataConverter) {
3535
this.base64UrlStringToCollectedClientDataConverter = base64UrlStringToCollectedClientDataConverter;

samples/spa/src/main/java/com/webauthn4j/springframework/security/webauthn/sample/app/service/UserAppServiceImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,6 @@ public UserEntity update(int id, UserUpdateForm userUpdateForm) {
7676
@Transactional
7777
@Override
7878
public void delete(int id) {
79-
delete(id);
79+
userService.delete(id);
8080
}
8181
}

samples/spa/src/main/java/com/webauthn4j/springframework/security/webauthn/sample/app/util/jackson/deserializer/AuthenticatorObjectFormDeserializer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
@JsonComponent
3232
public class AuthenticatorObjectFormDeserializer extends StdDeserializer<AttestationObjectForm> {
3333

34-
private Base64UrlStringToAttestationObjectConverter base64UrlStringToAttestationObjectConverter;
34+
private final Base64UrlStringToAttestationObjectConverter base64UrlStringToAttestationObjectConverter;
3535

3636
public AuthenticatorObjectFormDeserializer(Base64UrlStringToAttestationObjectConverter base64UrlStringToAttestationObjectConverter) {
3737
super(AttestationObjectForm.class);

samples/spa/src/main/java/com/webauthn4j/springframework/security/webauthn/sample/app/util/jackson/deserializer/CollectedClientDataDeserializer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
@JsonComponent
3232
public class CollectedClientDataDeserializer extends StdDeserializer<CollectedClientDataForm> {
3333

34-
private Base64UrlStringToCollectedClientDataConverter base64UrlStringToCollectedClientDataConverter;
34+
private final Base64UrlStringToCollectedClientDataConverter base64UrlStringToCollectedClientDataConverter;
3535

3636
public CollectedClientDataDeserializer(Base64UrlStringToCollectedClientDataConverter base64UrlStringToCollectedClientDataConverter) {
3737
super(CollectedClientDataForm.class);

samples/spa/src/main/java/com/webauthn4j/springframework/security/webauthn/sample/domain/component/AuthenticatorManagerImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@
2828
@Component
2929
public class AuthenticatorManagerImpl implements AuthenticatorManager {
3030

31-
private Logger logger = LoggerFactory.getLogger(AuthenticatorManagerImpl.class);
31+
private final Logger logger = LoggerFactory.getLogger(AuthenticatorManagerImpl.class);
3232

33-
private AuthenticatorEntityRepository authenticatorEntityRepository;
33+
private final AuthenticatorEntityRepository authenticatorEntityRepository;
3434

3535
public AuthenticatorManagerImpl(AuthenticatorEntityRepository authenticatorEntityRepository) {
3636
this.authenticatorEntityRepository = authenticatorEntityRepository;

samples/spa/src/main/java/com/webauthn4j/springframework/security/webauthn/sample/domain/component/UserManagerImpl.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@
4646
@Transactional
4747
public class UserManagerImpl implements UserManager, WebAuthnUserDetailsService {
4848

49-
private ModelMapper modelMapper;
49+
private final ModelMapper modelMapper;
5050

51-
private UserEntityRepository userEntityRepository;
52-
private AuthenticatorEntityRepository authenticatorEntityRepository;
51+
private final UserEntityRepository userEntityRepository;
52+
private final AuthenticatorEntityRepository authenticatorEntityRepository;
5353

5454
@Autowired
5555
public UserManagerImpl(ModelMapper mapper, UserEntityRepository userEntityRepository, AuthenticatorEntityRepository authenticatorEntityRepository) {

samples/spa/src/main/java/com/webauthn4j/springframework/security/webauthn/sample/domain/constant/MessageCodes.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
@SuppressWarnings("squid:S2068")
2323
public class MessageCodes {
2424

25-
public class Error {
26-
public class User {
25+
public static class Error {
26+
public static class User {
2727
public static final String USER_NOT_FOUND = "e.user.user_not_found";
2828
public static final String EMAIL_ADDRESS_IS_ALREADY_USED = "e.user.email_address_is_already_used";
2929
public static final String BAD_CHALLENGE = "e.user.bad_challenge";
@@ -32,21 +32,21 @@ private User() {
3232
}
3333
}
3434

35-
public class Group {
35+
public static class Group {
3636
public static final String GROUP_NOT_FOUND = "e.group.group_not_found";
3737

3838
private Group() {
3939
}
4040
}
4141

42-
public class Authority {
42+
public static class Authority {
4343
public static final String AUTHORITY_NOT_FOUND = "e.authority.authority_not_found";
4444

4545
private Authority() {
4646
}
4747
}
4848

49-
public class Authenticator {
49+
public static class Authenticator {
5050
public static final String AUTHENTICATOR_NOT_FOUND = "e.authenticator.authenticator_not_found";
5151

5252
private Authenticator() {

samples/spa/src/main/java/com/webauthn4j/springframework/security/webauthn/sample/infrastructure/util/jpa/converter/AttestationStatementConverter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
*/
2929
public class AttestationStatementConverter implements AttributeConverter<AttestationStatement, String> {
3030

31-
private CborConverter cborConverter;
31+
private final CborConverter cborConverter;
3232

3333
public AttestationStatementConverter(ObjectConverter objectConverter) {
3434
this.cborConverter = objectConverter.getCborConverter();

samples/spa/src/main/java/com/webauthn4j/springframework/security/webauthn/sample/infrastructure/util/jpa/converter/AttestationStatementSerializationContainer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public class AttestationStatementSerializationContainer {
3131
include = JsonTypeInfo.As.EXTERNAL_PROPERTY,
3232
property = "fmt"
3333
)
34-
private AttestationStatement attestationStatement;
34+
private final AttestationStatement attestationStatement;
3535

3636
@JsonCreator
3737
public AttestationStatementSerializationContainer(@JsonProperty("attStmt") AttestationStatement attestationStatement) {

samples/spa/src/main/java/com/webauthn4j/springframework/security/webauthn/sample/infrastructure/util/jpa/converter/AuthenticatorExtensionsConverter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
public class AuthenticatorExtensionsConverter implements AttributeConverter<Map<String, RegistrationExtensionAuthenticatorOutput<?>>, String> {
2929

30-
private CborConverter cborConverter;
30+
private final CborConverter cborConverter;
3131

3232
public AuthenticatorExtensionsConverter(ObjectConverter objectConverter) {
3333
this.cborConverter = objectConverter.getCborConverter();

samples/spa/src/main/java/com/webauthn4j/springframework/security/webauthn/sample/infrastructure/util/jpa/converter/COSEKeyConverter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
@Converter
2828
public class COSEKeyConverter implements AttributeConverter<COSEKey, String> {
2929

30-
private CborConverter cborConverter;
30+
private final CborConverter cborConverter;
3131

3232
public COSEKeyConverter(ObjectConverter objectConverter) {
3333
this.cborConverter = objectConverter.getCborConverter();

samples/spa/src/main/java/com/webauthn4j/springframework/security/webauthn/sample/infrastructure/util/jpa/converter/ClientExtensionsConverter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
public class ClientExtensionsConverter implements AttributeConverter<Map<String, RegistrationExtensionClientOutput<?>>, String> {
2828

29-
private JsonConverter jsonConverter;
29+
private final JsonConverter jsonConverter;
3030

3131
public ClientExtensionsConverter(ObjectConverter objectConverter) {
3232
this.jsonConverter = objectConverter.getJsonConverter();

samples/spa/src/test/java/e2e/page/AuthenticatorLoginComponent.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
public class AuthenticatorLoginComponent {
2323

24-
private WebDriver webDriver;
24+
private final WebDriver webDriver;
2525

2626
public AuthenticatorLoginComponent(WebDriver webDriver) {
2727
this.webDriver = webDriver;

samples/spa/src/test/java/e2e/page/PasswordLoginComponent.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
public class PasswordLoginComponent {
2323

24-
private WebDriver webDriver;
24+
private final WebDriver webDriver;
2525

2626
public PasswordLoginComponent(WebDriver webDriver) {
2727
this.webDriver = webDriver;

samples/spa/src/test/java/e2e/page/ProfileComponent.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121

2222
public class ProfileComponent {
2323

24-
private WebDriver webDriver;
25-
private WebDriverWait wait;
24+
private final WebDriver webDriver;
25+
private final WebDriverWait wait;
2626

2727

2828
public ProfileComponent(WebDriver webDriver) {

samples/spa/src/test/java/e2e/page/ResidentKeyRequirementDialog.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
public class ResidentKeyRequirementDialog {
2323

24-
private WebDriver webDriver;
24+
private final WebDriver webDriver;
2525

2626
public ResidentKeyRequirementDialog(WebDriver webDriver) {
2727
this.webDriver = webDriver;

samples/spa/src/test/java/e2e/page/SignupComponent.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@
2323

2424
public class SignupComponent {
2525

26-
private WebDriver webDriver;
27-
private WebDriverWait wait;
28-
private ResidentKeyRequirementDialog residentKeyRequirementDialog;
26+
private final WebDriver webDriver;
27+
private final WebDriverWait wait;
28+
private final ResidentKeyRequirementDialog residentKeyRequirementDialog;
2929

3030
public SignupComponent(WebDriver webDriver) {
3131
this.webDriver = webDriver;

webauthn4j-spring-security-core/src/main/java/com/webauthn4j/springframework/security/webauthn/WebAuthnAssertionAuthenticationToken.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
2222
import org.springframework.security.core.Authentication;
2323

24+
import java.util.Objects;
25+
2426
/**
2527
* An {@link Authentication} implementation for representing WebAuthn assertion like
2628
* {@link UsernamePasswordAuthenticationToken} for password authentication
@@ -105,7 +107,7 @@ public boolean equals(Object o) {
105107

106108
WebAuthnAssertionAuthenticationToken that = (WebAuthnAssertionAuthenticationToken) o;
107109

108-
return credentials != null ? credentials.equals(that.credentials) : that.credentials == null;
110+
return Objects.equals(credentials, that.credentials);
109111
}
110112

111113
/**

webauthn4j-spring-security-core/src/main/java/com/webauthn4j/springframework/security/webauthn/WebAuthnAuthenticationProvider.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,15 @@ public class WebAuthnAuthenticationProvider implements AuthenticationProvider {
5353

5454
protected final Log logger = LogFactory.getLog(getClass());
5555

56-
protected MessageSourceAccessor messages = SpringSecurityWebAuthnMessageSource.getAccessor();
56+
protected final MessageSourceAccessor messages = SpringSecurityWebAuthnMessageSource.getAccessor();
5757
private WebAuthnUserDetailsService userDetailsService;
58-
private WebAuthnAuthenticatorService authenticatorService;
59-
private WebAuthnManager webAuthnManager;
58+
private final WebAuthnAuthenticatorService authenticatorService;
59+
private final WebAuthnManager webAuthnManager;
6060
private boolean forcePrincipalAsString = false;
6161
private boolean hideCredentialIdNotFoundExceptions = true;
6262
private UserDetailsChecker preAuthenticationChecks = new DefaultPreAuthenticationChecks();
6363
private UserDetailsChecker postAuthenticationChecks = new DefaultPostAuthenticationChecks();
64-
private GrantedAuthoritiesMapper authoritiesMapper = new NullAuthoritiesMapper();
64+
private final GrantedAuthoritiesMapper authoritiesMapper = new NullAuthoritiesMapper();
6565

6666
// ~ Constructor
6767
// ========================================================================================================

webauthn4j-spring-security-core/src/main/java/com/webauthn4j/springframework/security/webauthn/WebAuthnAuthenticationToken.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424
import java.io.Serializable;
2525
import java.util.Collection;
26+
import java.util.Objects;
2627

2728
/**
2829
* An {@link Authentication} implementation that is designed for Web Authentication specification.
@@ -31,8 +32,8 @@ public class WebAuthnAuthenticationToken extends AbstractAuthenticationToken {
3132

3233
//~ Instance fields
3334
// ================================================================================================
34-
private Serializable principal;
35-
private WebAuthnAuthenticationRequest credentials;
35+
private final Serializable principal;
36+
private final WebAuthnAuthenticationRequest credentials;
3637

3738
// ~ Constructor
3839
// ========================================================================================================
@@ -81,8 +82,8 @@ public boolean equals(Object o) {
8182

8283
WebAuthnAuthenticationToken that = (WebAuthnAuthenticationToken) o;
8384

84-
if (principal != null ? !principal.equals(that.principal) : that.principal != null) return false;
85-
return credentials != null ? credentials.equals(that.credentials) : that.credentials == null;
85+
if (!Objects.equals(principal, that.principal)) return false;
86+
return Objects.equals(credentials, that.credentials);
8687
}
8788

8889
/**

webauthn4j-spring-security-core/src/main/java/com/webauthn4j/springframework/security/webauthn/WebAuthnProcessingFilter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public class WebAuthnProcessingFilter extends UsernamePasswordAuthenticationFilt
6868

6969
//~ Instance fields
7070
// ================================================================================================
71-
private List<GrantedAuthority> authorities;
71+
private final List<GrantedAuthority> authorities;
7272

7373
private String credentialIdParameter = SPRING_SECURITY_FORM_CREDENTIAL_ID_KEY;
7474
private String clientDataJSONParameter = SPRING_SECURITY_FORM_CLIENT_DATA_JSON_KEY;

webauthn4j-spring-security-core/src/main/java/com/webauthn4j/springframework/security/webauthn/WebAuthnRegistrationRequestValidationResponse.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ public class WebAuthnRegistrationRequestValidationResponse {
2828
// ~ Instance fields
2929
// ================================================================================================
3030

31-
private CollectedClientData collectedClientData;
32-
private AttestationObject attestationObject;
33-
private AuthenticationExtensionsClientOutputs<RegistrationExtensionClientOutput<?>> registrationExtensionsClientOutputs;
31+
private final CollectedClientData collectedClientData;
32+
private final AttestationObject attestationObject;
33+
private final AuthenticationExtensionsClientOutputs<RegistrationExtensionClientOutput<?>> registrationExtensionsClientOutputs;
3434

3535
// ~ Constructors
3636
// ===================================================================================================

0 commit comments

Comments
 (0)