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

com.bimface.sdk.config.authorization.Credential Maven / Gradle / Ivy

The newest version!
package com.bimface.sdk.config.authorization;

/**
 * APP证书
 * 
 * @author bimface, 2016-06-01.
 */
public final class Credential {

    private String appKey;
    private String appSecret;

    public Credential(String appKey, String appSecret) {
        check(appKey, appSecret);
        this.appKey = appKey;
        this.appSecret = appSecret;
    }

    public String getAppKey() {
        return appKey;
    }

    public void setAppKey(String appKey) {
        this.appKey = appKey;
    }

    public String getAppSecret() {
        return appSecret;
    }

    public void setAppSecret(String appSecret) {
        this.appSecret = appSecret;
    }

    private void check(String appKey, String appSecret) {
        if (appKey == null || appKey.equals("")) {
            throw new IllegalArgumentException("appKey should not be null or empty.");
        }
        if (appSecret == null || appSecret.equals("")) {
            throw new IllegalArgumentException("appSecret should not be null or empty.");
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy