类 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
    • 字段概要

      字段 
      修饰符和类型 字段 说明
      private long lastRefreshTime
      Last timestamp refresh security info from server.
      private com.alibaba.nacos.plugin.auth.api.LoginIdentityContext loginIdentityContext
      A context to take with when sending request to Nacos server.
      private static org.slf4j.Logger SECURITY_LOGGER  
      private long tokenRefreshWindow
      time window to refresh security info in seconds.
      private long tokenTtl
      TTL of token in seconds.
      • 从类继承的字段 com.alibaba.nacos.plugin.auth.spi.client.AbstractClientAuthService

        nacosRestTemplate, serverList
    • 方法概要

      所有方法 实例方法 具体方法 
      修饰符和类型 方法 说明
      com.alibaba.nacos.plugin.auth.api.LoginIdentityContext getLoginIdentityContext​(com.alibaba.nacos.plugin.auth.api.RequestResource resource)  
      java.lang.Boolean login​(java.util.Properties properties)
      Login to servers.
      void shutdown()  
      • 从类继承的方法 com.alibaba.nacos.plugin.auth.spi.client.AbstractClientAuthService

        setNacosRestTemplate, setServerList
      • 从类继承的方法 java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 字段详细资料

      • 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.
    • 构造器详细资料

      • NacosClientAuthServiceImpl

        public NacosClientAuthServiceImpl()
    • 方法详细资料

      • 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