Package com.example.blogs.app.config
Class JWTConfig
java.lang.Object
com.example.blogs.app.config.JWTConfig
Configuration for JWT parsing and validation using JJWT library.
Provides a shared JwtParser bean for token verification across the application.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionio.jsonwebtoken.JwtParserCreates a JWT parser bean configured with the signing key for token verification.
-
Constructor Details
-
JWTConfig
Constructs JWTConfig with HMAC SHA256 signing key from application properties.- Parameters:
secretKey- the secret key for JWT signing and verification
-
-
Method Details
-
jwtParser
Creates a JWT parser bean configured with the signing key for token verification.- Returns:
- configured JwtParser for parsing and validating JWT tokens
-