package io.delphiplatform.api.security;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;

@Configuration
public class AuthConfiguration {

    @Value("${auth0.audience:dev-delphi-api}")
    private String audience;
    @Value("${auth0.grant-type:client_credentials}")
    private String grantType;
    @Value("${auth0.domain}")
    private String domain;
    @Value("${auth0.issuer}")
    private String issuer;
    @Value("${auth0.token-url}")
    private String tokenUrl;
    @Value("${auth0.authorize-url}")
    private String authorizeUrl;
    @Value("${auth0.jwks-url}")
    private String jwksUrl;
    @Value("${auth0.jwks-cache-ttl-mins}")
    private Integer jwksCacheTtlMins;

    @Autowired
    public AuthConfiguration() {
    }

    public String getAudience() {
        return audience;
    }

    public String getGrantType() {
        return grantType;
    }

    public String getDomain() {
        return domain;
    }

    public String getIssuer() {
        return issuer;
    }

    public String getTokenUrl() {
        return tokenUrl;
    }

    public String getAuthorizeUrl() {
        return authorizeUrl;
    }

    public String getJwksUrl() {
        return jwksUrl;
    }

    public Integer getJwksCacheTtlMins() {
        return jwksCacheTtlMins;
    }
}
