package com.css.txw.sso.configuration;


import com.aliyun.dysmsapi20170525.Client;
import com.aliyun.teaopenapi.models.Config;
import com.css.ggzc.framework.cache.utils.CacheUtils;

import static com.css.txw.sso.constants.SsoConstants.*;

public class SMSClient {
    public static Client createClient() throws Exception {
        Config config = new Config()
                .setAccessKeyId(CacheUtils.dm2mc("xt_xtcs",MHZC_SMS_KEY))
                .setAccessKeySecret(CacheUtils.dm2mc("xt_xtcs",MHZC_SMS_SECRET));
        // 配置 Endpoint
        config.endpoint = MHZC_SMS_ENDPOINT;
        return new Client(config);
    }

}