Class JwtAuthProviderFactory


  • public class JwtAuthProviderFactory
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static org.springframework.security.oauth2.server.resource.authentication.JwtAuthenticationProvider forAuthorities​(org.springframework.security.oauth2.jwt.JwtDecoder jwtDecoder)
      Creates JwtAuthenticationProvider that emits authorities from JWT token claim as GrantedAuthority
      static org.springframework.security.oauth2.server.resource.authentication.JwtAuthenticationProvider forRoles​(org.springframework.security.oauth2.jwt.JwtDecoder jwtDecoder)
      Creates JwtAuthenticationProvider that emits roles from JWT token clain as GrantedAuthority
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JwtAuthProviderFactory

        public JwtAuthProviderFactory()
    • Method Detail

      • forRoles

        public static org.springframework.security.oauth2.server.resource.authentication.JwtAuthenticationProvider forRoles​(org.springframework.security.oauth2.jwt.JwtDecoder jwtDecoder)
        Creates JwtAuthenticationProvider that emits roles from JWT token clain as GrantedAuthority
        Parameters:
        jwtDecoder - JWT token decoder
        Returns:
        JwtAuthenticationProvider
      • forAuthorities

        public static org.springframework.security.oauth2.server.resource.authentication.JwtAuthenticationProvider forAuthorities​(org.springframework.security.oauth2.jwt.JwtDecoder jwtDecoder)
        Creates JwtAuthenticationProvider that emits authorities from JWT token claim as GrantedAuthority
        Parameters:
        jwtDecoder - JWT token decoder
        Returns:
        JwtAuthenticationProvider