// Path: src/main/java/com/github/segator/proxylive/config/JwtConfiguration.java
// @Configuration
// public class JwtConfiguration {
//     private final Logger logger = LoggerFactory.getLogger(JwtConfiguration.class);
//     private String secret;
//     private Integer expireInHours;
// 
//     JwtConfiguration( @Value("${authentication.secret:}")String secret,@Value("${authentication.expireInHours}")Integer expireInHours){
//         if(secret.isEmpty()){
//             this.secret = RandomStringUtils.randomAlphanumeric(65);
//         }else{
//             this.secret=secret;
//         }
//         this.expireInHours=expireInHours;
//     }
// 
// 
//     public String getSecret() {
//         return secret;
//     }
// 
//     public Integer getExpireInHours() {
//         return expireInHours;
//     }
// }


import com.github.segator.proxylive.config.JwtConfiguration;
import io.jsonwebtoken.JwtBuilder;
import io.jsonwebtoken.Jwts;
import io.jsonwebtoken.SignatureAlgorithm;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.AuthorityUtils;
import org.springframework.stereotype.Component;
import java.time.Instant;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
package com.github.segator.proxylive.helper;




@Component
public class JwtHelper {
// Path: src/main/java/com/github/segator/proxylive/config/JwtConfiguration.java
// @Configuration
// public class JwtConfiguration {
//     private final Logger logger = LoggerFactory.getLogger(JwtConfiguration.class);
//     private String secret;
//     private Integer expireInHours;
// 
//     JwtConfiguration( @Value("${authentication.secret:}")String secret,@Value("${authentication.expireInHours}")Integer expireInHours){
//         if(secret.isEmpty()){
//             this.secret = RandomStringUtils.randomAlphanumeric(65);
//         }else{
//             this.secret=secret;
//         }
//         this.expireInHours=expireInHours;
//     }
// 
// 
//     public String getSecret() {
//         return secret;
//     }
// 
//     public Integer getExpireInHours() {
//         return expireInHours;
//     }
// }


// Path: src/main/java/com/github/segator/proxylive/helper/JwtHelper.java
import com.github.segator.proxylive.config.JwtConfiguration;
import io.jsonwebtoken.JwtBuilder;
import io.jsonwebtoken.Jwts;
import io.jsonwebtoken.SignatureAlgorithm;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.AuthorityUtils;
import org.springframework.stereotype.Component;
import java.time.Instant;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

package com.github.segator.proxylive.helper;




@Component
public class JwtHelper {
    private JwtConfiguration jwtConfiguration;