All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.wavefront.agent.auth.TokenAuthenticator Maven / Gradle / Ivy

There is a newer version: 9999.0
Show newest version
package com.wavefront.agent.auth;

import javax.annotation.Nullable;

/**
 * Token validator for processing incoming requests.
 *
 * @author [email protected]
 */
public interface TokenAuthenticator {
  /**
   * Shared dummy authenticator.
   */
  TokenAuthenticator DUMMY_AUTHENTICATOR = new DummyAuthenticator();

  /**
   * Validate a token.
   *
   * @param token token to validate.
   * @return true if the token is considered valid.
   */
  boolean authorize(@Nullable String token);

  /**
   * Check whether authentication is required (i.e. "true" authenticator)
   *
   * @return true if authentication is required.
   */
  boolean authRequired();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy