package com.sf.oauth.enums;

import com.sf.oauth.config.AuthSource;
import com.sf.oauth.request.AuthDefaultRequest;
import com.sf.oauth.request.AuthHuaweiRequest;

/**
 * 内置的各api需要的url， 用枚举类分平台类型管理
 *
 * @author zoukun
 */
public enum AuthDefaultSource implements AuthSource {


    /**
     * 华为oauth2/v3
     */
    HUAWEI {
        @Override
        public String authorize() {
            return "https://oauth-login.cloud.huawei.com/oauth2/v3/authorize";
        }

        @Override
        public String accessToken() {
            return "https://oauth-login.cloud.huawei.com/oauth2/v3/token";
        }

        @Override
        public String userInfo() {
            return "https://account.cloud.huawei.com/rest.php";
        }

        @Override
        public String refresh() {
            return "https://oauth-login.cloud.huawei.com/oauth2/v3/token";
        }

        @Override
        public Class<? extends AuthDefaultRequest> getTargetClass() {
            return AuthHuaweiRequest.class;
        }
    },



}
