Class DefaultAuthoritiesExtractor
java.lang.Object
org.springframework.security.oauth2.server.resource.authentication.JwtAuthenticationConverter
com.sap.cloud.security.xsuaa.extractor.DefaultAuthoritiesExtractor
- All Implemented Interfaces:
AuthoritiesExtractor,org.springframework.core.convert.converter.Converter<org.springframework.security.oauth2.jwt.Jwt,org.springframework.security.authentication.AbstractAuthenticationToken>
public class DefaultAuthoritiesExtractor
extends org.springframework.security.oauth2.server.resource.authentication.JwtAuthenticationConverter
implements AuthoritiesExtractor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Collection<org.springframework.security.core.GrantedAuthority>extractAuthorities(org.springframework.security.oauth2.jwt.Jwt jwt) Collection<org.springframework.security.core.GrantedAuthority>getAuthorities(XsuaaToken jwt) Returns the granted authorities based on the information in the Jwt.Methods inherited from class org.springframework.security.oauth2.server.resource.authentication.JwtAuthenticationConverter
convert, setJwtGrantedAuthoritiesConverter, setPrincipalClaimNameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.core.convert.converter.Converter
andThen
-
Constructor Details
-
DefaultAuthoritiesExtractor
public DefaultAuthoritiesExtractor()
-
-
Method Details
-
getAuthorities
public Collection<org.springframework.security.core.GrantedAuthority> getAuthorities(XsuaaToken jwt) Description copied from interface:AuthoritiesExtractorReturns the granted authorities based on the information in the Jwt. A standard implementation will base the granted authorities on the scopes.- Specified by:
getAuthoritiesin interfaceAuthoritiesExtractor- Parameters:
jwt- the Jwt to extract the authorities from.- Returns:
- the collection of granted authorities.
-
extractAuthorities
protected Collection<org.springframework.security.core.GrantedAuthority> extractAuthorities(org.springframework.security.oauth2.jwt.Jwt jwt)
-