com.wavefront.agent.auth.TokenAuthenticator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of proxy-test Show documentation
Show all versions of proxy-test Show documentation
Service for batching and relaying metric traffic to Wavefront
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();
}