Skip to content

Commit

Permalink
Fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
oharsta committed Nov 16, 2023
1 parent 4848fad commit 7665c6a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public User resolveArgument(MethodParameter methodParameter,
attributes = bearerTokenAuthentication.getTokenAttributes();
} else if (userPrincipal instanceof OAuth2AuthenticationToken authenticationToken) {
attributes = authenticationToken.getPrincipal().getAttributes();
} else if (StringUtils.hasText(apiTokenHeader) && apiTokenHeader.length() == 64) {
} else if (StringUtils.hasText(apiTokenHeader) && apiTokenHeader.length() == 36) {
String hashedToken = HashGenerator.hashToken(apiTokenHeader);
APIToken apiToken = apiTokenRepository.findByHashedValue(hashedToken)
.orElseThrow(UserRestrictionException::new);
Expand Down

0 comments on commit 7665c6a

Please sign in to comment.