类 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.AbstractClientAuthService
a ClientAuthService implement.
- 作者:
- wuyfee
-
字段概要
从类继承的字段 com.alibaba.nacos.plugin.auth.spi.client.AbstractClientAuthService
nacosRestTemplate, serverList -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明longgenerateTokenRefreshWindow(long tokenTtl) Randomly generate TokenRefreshWindow, Avoid a large number of logins causing pressure on the Nacos server.com.alibaba.nacos.plugin.auth.api.LoginIdentityContextgetLoginIdentityContext(com.alibaba.nacos.plugin.auth.api.RequestResource resource) login(Properties properties) Login to servers.voidshutdown()从类继承的方法 com.alibaba.nacos.plugin.auth.spi.client.AbstractClientAuthService
setNacosRestTemplate, setServerList
-
构造器详细资料
-
NacosClientAuthServiceImpl
public NacosClientAuthServiceImpl()
-
-
方法详细资料
-
login
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
-
generateTokenRefreshWindow
public long generateTokenRefreshWindow(long tokenTtl) Randomly generate TokenRefreshWindow, Avoid a large number of logins causing pressure on the Nacos server.- 参数:
tokenTtl- TTL of token in seconds.- 返回:
- tokenRefreshWindow, numerical range [tokenTtl/15 ~ tokenTtl/10]
-