Class JwtAuthProviderFactory
java.lang.Object
org.lognet.springboot.grpc.security.jwt.JwtAuthProviderFactory
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic 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
-
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)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
-