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

club.zhcs.lina.starter.oidc.OpenIDConnectConfigurationProperties Maven / Gradle / Ivy

There is a newer version: 3.3.4
Show newest version
/**
 * 
 */
package club.zhcs.lina.starter.oidc;

import org.springframework.boot.context.properties.ConfigurationProperties;

import lombok.Data;

/**
 * 
 */
@Data
@ConfigurationProperties("lina.oidc")
public class OpenIDConnectConfigurationProperties {

    /**
     * 启用
     */
    boolean enabled = false;
    /**
     * OIDC 发现地址
     */
    private String discoveryUrl;
    /**
     * 客户端ID
     */
    private String clientId;
    /**
     * 客户端秘钥
     */
    private String clientSecret;
    /**
     * 客户端域名
     */
    private String domain;

    /**
     * token cookie name
     */
    private String tokenCookieName = "token";

    /**
     * refreshToken cookie name
     */
    private String refreshTokenCookieName = "refreshToken";

    /**
     * authorization header name
     */
    private String authorizationHeaderName = "Authorization";

    /**
     * 回调成功显示页面地址
     */
    private String hanlderSuccessPage;
    /**
     * 回调处理器类型
     */
    private Type callbackHanlderType = Type.REDIRCT;

    public enum Type {
        COOKIE, REDIRCT
    }

    /**
     * @return
     */
    public String getRedirectUrl() {
        return String.format("%s/oauth2/oidc/callback", domain);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy