类 AuthConfigs
- java.lang.Object
-
- com.alibaba.nacos.common.notify.listener.Subscriber<com.alibaba.nacos.common.event.ServerConfigChangeEvent>
-
- com.alibaba.nacos.auth.common.AuthConfigs
-
@Configuration public class AuthConfigs extends com.alibaba.nacos.common.notify.listener.Subscriber<com.alibaba.nacos.common.event.ServerConfigChangeEvent>Auth related configurations.- 从以下版本开始:
- 1.2.0
- 作者:
- nkorange, mai.jh
-
-
字段概要
字段 修饰符和类型 字段 说明 private booleanauthEnabledWhether auth enabled.private static java.lang.BooleancachingEnabledprivate booleanenableUserAgentAuthWhiteprivate static org.slf4j.LoggerLOGGERprivate java.lang.StringnacosAuthSystemTypeWhich auth system is in use.private java.lang.StringsecretKeysecret key.private byte[]secretKeyBytessecret key byte array.private java.lang.StringserverIdentityKeyprivate java.lang.StringserverIdentityValueprivate longtokenValidityInSecondsToken validity time(seconds).
-
构造器概要
构造器 构造器 说明 AuthConfigs()
-
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 java.lang.StringgetNacosAuthSystemType()byte[]getSecretKeyBytes()java.lang.StringgetServerIdentityKey()java.lang.StringgetServerIdentityValue()longgetTokenValidityInSeconds()booleanisAuthEnabled()auth function is open.booleanisCachingEnabled()Whether permission information can be cached.booleanisEnableUserAgentAuthWhite()voidonEvent(com.alibaba.nacos.common.event.ServerConfigChangeEvent event)static voidsetCachingEnabled(boolean cachingEnabled)java.lang.Class<? extends com.alibaba.nacos.common.notify.Event>subscribeType()
-
-
-
字段详细资料
-
LOGGER
private static final org.slf4j.Logger LOGGER
-
cachingEnabled
private static java.lang.Boolean cachingEnabled
-
authEnabled
@Value("${nacos.core.auth.enabled:false}") private boolean authEnabledWhether auth enabled.
-
secretKey
@Value("${nacos.core.auth.default.token.secret.key:}") private java.lang.String secretKeysecret key.
-
secretKeyBytes
private byte[] secretKeyBytes
secret key byte array.
-
tokenValidityInSeconds
@Value("${nacos.core.auth.default.token.expire.seconds:18000}") private long tokenValidityInSecondsToken validity time(seconds).
-
nacosAuthSystemType
@Value("${nacos.core.auth.system.type:}") private java.lang.String nacosAuthSystemTypeWhich auth system is in use.
-
serverIdentityKey
@Value("${nacos.core.auth.server.identity.key:}") private java.lang.String serverIdentityKey
-
serverIdentityValue
@Value("${nacos.core.auth.server.identity.value:}") private java.lang.String serverIdentityValue
-
enableUserAgentAuthWhite
@Value("${nacos.core.auth.enable.userAgentAuthWhite:false}") private boolean enableUserAgentAuthWhite
-
-
方法详细资料
-
getSecretKeyBytes
public byte[] getSecretKeyBytes()
-
getTokenValidityInSeconds
public long getTokenValidityInSeconds()
-
getNacosAuthSystemType
public java.lang.String getNacosAuthSystemType()
-
getServerIdentityKey
public java.lang.String getServerIdentityKey()
-
getServerIdentityValue
public java.lang.String getServerIdentityValue()
-
isEnableUserAgentAuthWhite
public boolean isEnableUserAgentAuthWhite()
-
isAuthEnabled
public boolean isAuthEnabled()
auth function is open.- 返回:
- auth function is open
-
isCachingEnabled
public boolean isCachingEnabled()
Whether permission information can be cached.- 返回:
- bool
-
setCachingEnabled
public static void setCachingEnabled(boolean cachingEnabled)
-
onEvent
public void onEvent(com.alibaba.nacos.common.event.ServerConfigChangeEvent event)
- 指定者:
onEvent在类中com.alibaba.nacos.common.notify.listener.Subscriber<com.alibaba.nacos.common.event.ServerConfigChangeEvent>
-
subscribeType
public java.lang.Class<? extends com.alibaba.nacos.common.notify.Event> subscribeType()
- 指定者:
subscribeType在类中com.alibaba.nacos.common.notify.listener.Subscriber<com.alibaba.nacos.common.event.ServerConfigChangeEvent>
-
-