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

com.itheima.auth.sdk.config.AuthorityConfig Maven / Gradle / Ivy

package com.itheima.auth.sdk.config;

/**
 * @author libo
 * @Description
 * @date 2022/4/23 9:23
 **/
public class AuthorityConfig {

    private String host;
    private int port;
    private int timeout;

    private String token;
    private Long applicationId;
    //公钥文件路径,默认在classpath下auth目录下
    private String publicKeyFile = "auth/pub.key";

    public String getUri() {
        return String.format("http://%s:%s", this.host, this.port);
    }

    public AuthorityConfig(String host, int port, int timeout) {
        this.host = host;
        this.port = port;
        this.timeout = timeout;
    }

    public AuthorityConfig(String host, int port, int timeout, String token, Long applicationId) {
        this.host = host;
        this.port = port;
        this.timeout = timeout;
        this.token = token;
        this.applicationId = applicationId;
    }

    public String getHost() {
        return host;
    }

    public void setHost(String host) {
        this.host = host;
    }

    public int getPort() {
        return port;
    }

    public void setPort(int port) {
        this.port = port;
    }

    public int getTimeout() {
        return timeout;
    }

    public void setTimeout(int timeout) {
        this.timeout = timeout;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    public Long getApplicationId() {
        return applicationId;
    }

    public void setApplicationId(Long applicationId) {
        this.applicationId = applicationId;
    }

    public String getPublicKeyFile() {
        return publicKeyFile;
    }

    public void setPublicKeyFile(String publicKeyFile) {
        this.publicKeyFile = publicKeyFile;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy