JWT Token signature error

I have faced JWT token generation error while implementing HMACSHA256.
But this method is nor reconized by Springboot JWT library. com.auth0:java-jwt:3.19.0
Below is the code snippent:
Long expTime = System.currentTimeMillis() + TimeUnit.MINUTES.toMillis(90);
String jwtHeader = “{“alg”: “HS256”,“typ”: “JWT”}”;
String jwtPayload = “{\n”
+ " “iss”: “XXXXXXXXXX”,\n"
+ " “exp”: “+expTime+”\n"
+ “}”;
System.out.println(“expTime”+ expTime);
String API_SECRET = “XXXXXXXXl”;
String token = “”;
try {
Algorithm algorithm = Algorithm.HMACSHA256(
base64UrlEncode(jwtHeader) + “.” +
base64UrlEncode(jwtPayload));
token = JWT.create()
.withIssuer(“iss”)
.sign(algorithm);
} catch (JWTCreationException exception){
//Invalid Signing configuration / Couldn’t convert Claims.
}

Kindly help regarding this
Thanks

@dctesting,

Welcome to the Developer Forum and thank you for posting! We have signature code samples and a Sample App you can reference for your implementation. I’ve linked those resources below for your reference:

Generate Signature

Signature Sample App.

Let us know if you have any questions.

Regards,
Donte