Interface OAuthAccessTokenAuthorityProvider

All Known Implementing Classes:
OAuthAccessTokenAuthorityPrincipalProvider
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface OAuthAccessTokenAuthorityProvider
Contributes the authorities claim of the access tokens the authorization server issues. Providers are consulted in ascending getOrder(); the first non-empty answer becomes the claim and the providers after it are not consulted. Refusing a token belongs to OAuthAccessTokenAudienceProvider, whose providers are all consulted.
  • Method Summary

    Modifier and Type
    Method
    Description
    default int
     
    provideAuthorities(org.springframework.security.oauth2.server.authorization.token.OAuth2TokenContext context)
     
  • Method Details

    • provideAuthorities

      Set<String> provideAuthorities(org.springframework.security.oauth2.server.authorization.token.OAuth2TokenContext context)
      Parameters:
      context - the access token being issued
      Returns:
      the authorities of the token, or null or empty to let another provider answer
    • getOrder

      default int getOrder()
      Returns:
      this provider's position, lower values consulted first — the Spring Ordered convention