Interface GrantedAuthoritiesBuilder

  • 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 GrantedAuthoritiesBuilder
    Defines a method to build granted authorities given the role claim name and the unmarshalled JWT token. The implementation can choose to use the parameters or retrieve and return the granted authorities in an entirely different way, for example via a library routine or from a web service.
    Author:
    Keivan Khalichi
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      Collection<org.springframework.security.core.GrantedAuthority> build​(String theRoleClaim, org.springframework.security.oauth2.jwt.Jwt theJWT)
      Builds a collection of GrantedAuthority instances from the provided Jwt instance.
    • Method Detail

      • build

        Collection<org.springframework.security.core.GrantedAuthority> build​(String theRoleClaim,
                                                                             org.springframework.security.oauth2.jwt.Jwt theJWT)
        Builds a collection of GrantedAuthority instances from the provided Jwt instance. The theRoleClaim specifies the OAuth2 claim that includes the set of roles provided by the Identity Provider (IdP).
        Parameters:
        theRoleClaim - the name of the claim containing roles provided by the IdP; claim name is normally configured by the IdP administrator
        theJWT - the unmarshalled JWT that was passed as the Bearer HTTP header
        Returns:
        collection of GrantedAuthority instances, normally SimpleGrantedAuthority