Package com.example.blogs.app.config
Class JWTDecoderConfig
java.lang.Object
com.example.blogs.app.config.JWTDecoderConfig
Provides JWT decoder bean for validating and parsing JWT tokens in Spring Security OAuth2 resource server.
-
Constructor Summary
ConstructorsConstructorDescriptionJWTDecoderConfig(String secret) Constructs JwtDecoderConfig with the configured HMAC SHA256 secret key. -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.security.oauth2.jwt.JwtDecoderCreates a JWT decoder bean that validates and parses JWT tokens using JJWT library.
-
Constructor Details
-
JWTDecoderConfig
Constructs JwtDecoderConfig with the configured HMAC SHA256 secret key.- Parameters:
secret- the secret key for JWT verification, loaded from application properties
-
-
Method Details
-
jwtDecoder
Creates a JWT decoder bean that validates and parses JWT tokens using JJWT library.- Returns:
- JWT decoder for Spring Security OAuth2 resource server
-