Class JwtAuthProviderFactory

java.lang.Object
org.lognet.springboot.grpc.security.jwt.JwtAuthProviderFactory

public class JwtAuthProviderFactory extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    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 Details

    • JwtAuthProviderFactory

      public JwtAuthProviderFactory()
  • Method Details

    • 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