类 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
  • 构造器概要

    构造器
    构造器
    说明
     
  • 方法概要

    修饰符和类型
    方法
    说明
    long
    Randomly generate TokenRefreshWindow, Avoid a large number of logins causing pressure on the Nacos server.
    com.alibaba.nacos.plugin.auth.api.LoginIdentityContext
    getLoginIdentityContext(com.alibaba.nacos.plugin.auth.api.RequestResource resource)
     
    login(Properties properties)
    Login to servers.
    void
     

    从类继承的方法 com.alibaba.nacos.plugin.auth.spi.client.AbstractClientAuthService

    setNacosRestTemplate, setServerList

    从类继承的方法 java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 构造器详细资料

    • NacosClientAuthServiceImpl

      public NacosClientAuthServiceImpl()
  • 方法详细资料

    • login

      public Boolean login(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
    • 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]