Skip to content

Commit 215c101

Browse files
author
Steve Riesenberg
committed
Polish gh-1309
1 parent 82b7059 commit 215c101

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

oauth2-authorization-server/src/main/java/org/springframework/security/oauth2/server/authorization/web/authentication/OAuth2DeviceVerificationAuthenticationConverter.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ public final class OAuth2DeviceVerificationAuthenticationConverter implements Au
4848
private static final String ERROR_URI = "https://datatracker.ietf.org/doc/html/rfc6749#section-5.2";
4949
private static final Authentication ANONYMOUS_AUTHENTICATION = new AnonymousAuthenticationToken(
5050
"anonymous", "anonymousUser", AuthorityUtils.createAuthorityList("ROLE_ANONYMOUS"));
51+
5152
@Override
5253
public Authentication convert(HttpServletRequest request) {
5354
if (!("GET".equals(request.getMethod()) || "POST".equals(request.getMethod()))) {

oauth2-authorization-server/src/main/java/org/springframework/security/oauth2/server/authorization/web/authentication/OAuth2EndpointUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,6 @@ static String normalizeUserCode(String userCode) {
9696
}
9797

9898
static boolean validateUserCode(String userCode) {
99-
return userCode != null && userCode.toUpperCase().replaceAll("[^A-Z\\d]+", "").length() == 8;
99+
return (userCode != null && userCode.toUpperCase().replaceAll("[^A-Z\\d]+", "").length() == 8);
100100
}
101101
}

0 commit comments

Comments
 (0)