All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.dahuatech.icc.oauth.model.v202010.OauthConfigBaseInfo Maven / Gradle / Ivy

The newest version!
package com.dahuatech.icc.oauth.model.v202010;

import com.dahuatech.icc.oauth.profile.GrantType;

public abstract class OauthConfigBaseInfo {

    /** 申请认证ID */
    protected String clientId;
    /** 申请认证秘钥 */
    protected String clientSecret;
    /** 当前使用认证类型 */
    protected GrantType grantType;
    /**平台ip 端口信息*/
    protected HttpConfigInfo httpConfigInfo;

    public OauthConfigBaseInfo(){

    }

    public OauthConfigBaseInfo(String host,String clientId,String clientSecret,GrantType grantType){
        this.httpConfigInfo = new HttpConfigInfo(host);
        this.clientId = clientId;
        this.clientSecret = clientSecret;
        this.grantType = grantType;
    }

    public OauthConfigBaseInfo(String host,String clientId,String clientSecret,GrantType grantType,boolean isEnableHttpTest,String httpsPort,String httpPort){
        this(host,clientId,clientSecret,grantType);
        this.httpConfigInfo = new HttpConfigInfo(host,isEnableHttpTest,httpsPort,httpPort);
    }

    public OauthConfigBaseInfo(String host, String clientId, String clientSecret, GrantType grantType, boolean isEnableHttpTest, String port) {
        this(host, clientId, clientSecret, grantType);
        if (isEnableHttpTest) {
            this.httpConfigInfo = new HttpConfigInfo(host, true, null, port);
        } else {
            this.httpConfigInfo = new HttpConfigInfo(host, false, port, null);
        }
    }

    public String getClientId() {
        return clientId;
    }

    public void setClientId(String clientId) {
        this.clientId = clientId;
    }

    public String getClientSecret() {
        return clientSecret;
    }

    public void setClientSecret(String clientSecret) {
        this.clientSecret = clientSecret;
    }

    public GrantType getGrantType() {
        return grantType;
    }

    public void setGrantType(GrantType grantType) {
        this.grantType = grantType;
    }

    public HttpConfigInfo getHttpConfigInfo() {
        return httpConfigInfo;
    }

    public void setHttpConfigInfo(HttpConfigInfo httpConfigInfo) {
        this.httpConfigInfo = httpConfigInfo;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy