Interface AuthoritiesExtractor

All Known Implementing Classes:
DefaultAuthoritiesExtractor, LocalAuthoritiesExtractor

public interface AuthoritiesExtractor
Extracts the authorities from the Jwt token. Can use this method to map / manipulate scopes, e.g. by changing their prefix, etc.
  • Method Summary

    Modifier and Type
    Method
    Description
    Collection<org.springframework.security.core.GrantedAuthority>
    Returns the granted authorities based on the information in the Jwt.
  • Method Details

    • getAuthorities

      Collection<org.springframework.security.core.GrantedAuthority> getAuthorities(XsuaaToken jwt)
      Returns the granted authorities based on the information in the Jwt. A standard implementation will base the granted authorities on the scopes.
      Parameters:
      jwt - the Jwt to extract the authorities from.
      Returns:
      the collection of granted authorities.