类 NacosClientAuthServiceImpl
- java.lang.Object
-
- com.alibaba.nacos.plugin.auth.spi.client.AbstractClientAuthService
-
- com.alibaba.nacos.client.auth.impl.NacosClientAuthServiceImpl
-
- 所有已实现的接口:
com.alibaba.nacos.common.lifecycle.Closeable,com.alibaba.nacos.plugin.auth.spi.client.ClientAuthService
public class NacosClientAuthServiceImpl extends com.alibaba.nacos.plugin.auth.spi.client.AbstractClientAuthServicea ClientAuthService implement.- 作者:
- wuyfee
-
-
字段概要
字段 修饰符和类型 字段 说明 private longlastRefreshTimeLast timestamp refresh security info from server.private com.alibaba.nacos.plugin.auth.api.LoginIdentityContextloginIdentityContextA context to take with when sending request to Nacos server.private static org.slf4j.LoggerSECURITY_LOGGERprivate longtokenRefreshWindowtime window to refresh security info in seconds.private longtokenTtlTTL of token in seconds.
-
构造器概要
构造器 构造器 说明 NacosClientAuthServiceImpl()
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 com.alibaba.nacos.plugin.auth.api.LoginIdentityContextgetLoginIdentityContext(com.alibaba.nacos.plugin.auth.api.RequestResource resource)java.lang.Booleanlogin(java.util.Properties properties)Login to servers.voidshutdown()
-
-
-
字段详细资料
-
SECURITY_LOGGER
private static final org.slf4j.Logger SECURITY_LOGGER
-
tokenTtl
private long tokenTtl
TTL of token in seconds.
-
lastRefreshTime
private long lastRefreshTime
Last timestamp refresh security info from server.
-
tokenRefreshWindow
private long tokenRefreshWindow
time window to refresh security info in seconds.
-
loginIdentityContext
private volatile com.alibaba.nacos.plugin.auth.api.LoginIdentityContext loginIdentityContext
A context to take with when sending request to Nacos server.
-
-
方法详细资料
-
login
public java.lang.Boolean login(java.util.Properties properties)
Login to servers.- 返回:
- true if login successfully
-
getLoginIdentityContext
public com.alibaba.nacos.plugin.auth.api.LoginIdentityContext getLoginIdentityContext(com.alibaba.nacos.plugin.auth.api.RequestResource resource)
-
shutdown
public void shutdown() throws com.alibaba.nacos.api.exception.NacosException- 抛出:
com.alibaba.nacos.api.exception.NacosException
-
-