package com.tcm.training.admin.app.auth.config;
|
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
import org.springframework.stereotype.Component;
|
|
/**
|
* APP 登录认证配置。
|
*/
|
@Component
|
@ConfigurationProperties(prefix = "app.auth")
|
public class AppAuthProperties {
|
|
/**
|
* APP 登录 token 有效期,默认 30 天;设置为 -1 时表示永久有效。
|
*/
|
private long tokenTimeoutSeconds = 30L * 24 * 60 * 60;
|
|
/**
|
* 获取 APP 登录 token 有效期秒数。
|
*/
|
public long getTokenTimeoutSeconds() {
|
return tokenTimeoutSeconds;
|
}
|
|
/**
|
* 设置 APP 登录 token 有效期秒数。
|
*/
|
public void setTokenTimeoutSeconds(long tokenTimeoutSeconds) {
|
this.tokenTimeoutSeconds = tokenTimeoutSeconds;
|
}
|
}
|