Class JwtBearerTokenAuthenticationConverter
java.lang.Object
org.springframework.security.oauth2.server.resource.authentication.JwtBearerTokenAuthenticationConverter
- All Implemented Interfaces:
org.springframework.core.convert.converter.Converter<Jwt,
AbstractAuthenticationToken>
public final class JwtBearerTokenAuthenticationConverter
extends Object
implements org.springframework.core.convert.converter.Converter<Jwt,AbstractAuthenticationToken>
A
Converter
that takes a Jwt
and converts it into a
BearerTokenAuthentication
.
In the process, it will attempt to parse either the "scope" or "scp" attribute,
whichever it finds first.
It's not intended that this implementation be configured since it is simply an adapter.
If you are using, for example, a custom JwtGrantedAuthoritiesConverter
, then
it's recommended that you simply create your own Converter
that delegates to
your custom JwtGrantedAuthoritiesConverter
and instantiates the appropriate
BearerTokenAuthentication
.- Since:
- 5.2
-
Constructor Details
-
JwtBearerTokenAuthenticationConverter
public JwtBearerTokenAuthenticationConverter()
-
-
Method Details
-
convert
- Specified by:
convert
in interfaceorg.springframework.core.convert.converter.Converter<Jwt,
AbstractAuthenticationToken>
-