Browse Source

Merge 74a15078a6 into 9095a1bffd

pull/18305/merge
Alfonso Ristorato 3 days ago committed by GitHub
parent
commit
a70b35e493
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 3
      oauth2/oauth2-resource-server/src/main/java/org/springframework/security/oauth2/server/resource/authentication/JwtAuthenticationProvider.java

3
oauth2/oauth2-resource-server/src/main/java/org/springframework/security/oauth2/server/resource/authentication/JwtAuthenticationProvider.java

@ -20,6 +20,7 @@ import java.util.Collection; @@ -20,6 +20,7 @@ import java.util.Collection;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.jspecify.annotations.NonNull;
import org.springframework.core.convert.converter.Converter;
import org.springframework.security.authentication.AbstractAuthenticationToken;
@ -83,7 +84,7 @@ public final class JwtAuthenticationProvider implements AuthenticationProvider { @@ -83,7 +84,7 @@ public final class JwtAuthenticationProvider implements AuthenticationProvider {
* @throws AuthenticationException if authentication failed for some reason
*/
@Override
public Authentication authenticate(Authentication authentication) throws AuthenticationException {
public @NonNull Authentication authenticate(Authentication authentication) throws AuthenticationException {
BearerTokenAuthenticationToken bearer = (BearerTokenAuthenticationToken) authentication;
Jwt jwt = getJwt(bearer);
AbstractAuthenticationToken token = this.jwtAuthenticationConverter.convert(jwt);

Loading…
Cancel
Save