Updated JwtService.java
This commit is contained in:
@@ -42,18 +42,17 @@ public class JwtService {
|
||||
Date expiry = new Date(now.getTime() + EXPIRATION_MS);
|
||||
|
||||
|
||||
String email =azureJwt.getClaim("email");
|
||||
|
||||
String email = azureJwt.getClaim("email");
|
||||
String username = email.split("@")[0];
|
||||
|
||||
return Jwts.builder()
|
||||
.setSubject(email)
|
||||
.setSubject(username)
|
||||
.setIssuedAt(new Date())
|
||||
.setExpiration(expiry)
|
||||
.signWith(getSignKey(), SignatureAlgorithm.HS512)
|
||||
//.signWith(SignatureAlgorithm.HS512, SECRET)
|
||||
.compact();
|
||||
|
||||
|
||||
}
|
||||
|
||||
public String generateInternalTokenFromUsername(Authentication authentication) {
|
||||
|
||||
Reference in New Issue
Block a user