package com.qnfhq.modules.authentication.util;

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

@Configuration("AliyunEkycConfig")
public class AliyunEkycConfig {

    @Value("${aliyun.ekyc.access-key-id}")
    private String accessKeyId;

    @Value("${aliyun.ekyc.access-key-secret}")
    private String accessKeySecret;

    @Value("${aliyun.ekyc.region-id}")
    private String regionId;

    @Value("${aliyun.ekyc.endpoint}")
    private String endpoint;

    @Bean
    public AliyunEkycUtil aliyunEkycUtil() throws Exception {
        AliyunEkycUtil aliyunEkycService = new AliyunEkycUtil(
                accessKeyId,
                accessKeySecret,
                regionId,
                endpoint
        );
        return aliyunEkycService;
    }
}