package com.spring.infra.security.jwt;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.ConstructorBinding;

import lombok.Getter;
import lombok.RequiredArgsConstructor;

/**
 * JWT(JSON Web Token) 관련 설정 속성을 관리하는 클래스입니다.
 * 'jwt' 접두사로 시작하는 설정 속성을 바인딩합니다.
 * @author mindol
 * @version 1.0
 */
@Getter
@ConstructorBinding
@ConfigurationProperties(prefix = "jwt")
@RequiredArgsConstructor
public final class JwtProperties {
    
    private final TokenProperties accessToken;
    private final TokenProperties refreshToken;

    @Getter
    @RequiredArgsConstructor
    public static class TokenProperties {
        private final String secret;
        private final long expiration;
    }

}
