Class JwtBearerTokenAuthenticationConverter
- java.lang.Object
-
- org.springframework.security.oauth2.server.resource.authentication.JwtBearerTokenAuthenticationConverter
-
- All Implemented Interfaces:
org.springframework.core.convert.converter.Converter<org.springframework.security.oauth2.jwt.Jwt,org.springframework.security.authentication.AbstractAuthenticationToken>
public final class JwtBearerTokenAuthenticationConverter extends java.lang.Object implements org.springframework.core.convert.converter.Converter<org.springframework.security.oauth2.jwt.Jwt,org.springframework.security.authentication.AbstractAuthenticationToken>AConverterthat takes aJwtand converts it into aBearerTokenAuthentication. 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 customJwtGrantedAuthoritiesConverter, then it's recommended that you simply create your ownConverterthat delegates to your customJwtGrantedAuthoritiesConverterand instantiates the appropriateBearerTokenAuthentication.- Since:
- 5.2
-
-
Constructor Summary
Constructors Constructor Description JwtBearerTokenAuthenticationConverter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.security.authentication.AbstractAuthenticationTokenconvert(org.springframework.security.oauth2.jwt.Jwt jwt)
-
-
-
Method Detail
-
convert
public org.springframework.security.authentication.AbstractAuthenticationToken convert(org.springframework.security.oauth2.jwt.Jwt jwt)
- Specified by:
convertin interfaceorg.springframework.core.convert.converter.Converter<org.springframework.security.oauth2.jwt.Jwt,org.springframework.security.authentication.AbstractAuthenticationToken>
-
-