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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected Collection<org.springframework.security.core.GrantedAuthority>
    extractAuthorities(org.springframework.security.oauth2.jwt.Jwt jwt)
     
    Collection<org.springframework.security.core.GrantedAuthority>
    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, setPrincipalClaimName

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods 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: AuthoritiesExtractor
      Returns the granted authorities based on the information in the Jwt. A standard implementation will base the granted authorities on the scopes.
      Specified by:
      getAuthorities in interface AuthoritiesExtractor
      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)