Skip to content

Commit

Permalink
key generate
Browse files Browse the repository at this point in the history
  • Loading branch information
nekolr committed Nov 21, 2023
1 parent e75de10 commit 83e4b9f
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@


import io.jsonwebtoken.*;
import io.jsonwebtoken.security.Keys;
import io.jsonwebtoken.security.SignatureException;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
Expand All @@ -22,7 +21,7 @@ public class TokenProvider {

public TokenProvider(@Value("${jwt.period}") Duration period) {
this.period = period;
this.secretKey = Keys.secretKeyFor(SignatureAlgorithm.HS256);
this.secretKey = Jwts.SIG.HS256.key().build();
}

public String createToken(String username) {
Expand Down

0 comments on commit 83e4b9f

Please sign in to comment.