Class JwtAuthProviderFactory
- java.lang.Object
-
- org.lognet.springboot.grpc.security.jwt.JwtAuthProviderFactory
-
public class JwtAuthProviderFactory extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description JwtAuthProviderFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.springframework.security.oauth2.server.resource.authentication.JwtAuthenticationProviderforAuthorities(org.springframework.security.oauth2.jwt.JwtDecoder jwtDecoder)CreatesJwtAuthenticationProviderthat emits authorities from JWT token claim asGrantedAuthoritystatic org.springframework.security.oauth2.server.resource.authentication.JwtAuthenticationProviderforRoles(org.springframework.security.oauth2.jwt.JwtDecoder jwtDecoder)CreatesJwtAuthenticationProviderthat emits roles from JWT token clain asGrantedAuthority
-
-
-
Method Detail
-
forRoles
public static org.springframework.security.oauth2.server.resource.authentication.JwtAuthenticationProvider forRoles(org.springframework.security.oauth2.jwt.JwtDecoder jwtDecoder)
CreatesJwtAuthenticationProviderthat emits roles from JWT token clain asGrantedAuthority- 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)
CreatesJwtAuthenticationProviderthat emits authorities from JWT token claim asGrantedAuthority- Parameters:
jwtDecoder- JWT token decoder- Returns:
- JwtAuthenticationProvider
-
-