Class SimpleAuthenticator
- java.lang.Object
- 
- org.apache.tinkerpop.gremlin.server.auth.SimpleAuthenticator
 
- 
- All Implemented Interfaces:
- Authenticator
 
 public class SimpleAuthenticator extends Object implements Authenticator A simple implementation of anAuthenticatorthat uses aGraphinstance as a credential store. Management of the credential store can be handled through theCredentialTraversalDslDSL.- Author:
- Stephen Mallette (http://stephen.genoprime.com)
 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from interface org.apache.tinkerpop.gremlin.server.auth.AuthenticatorAuthenticator.SaslNegotiator
 
- 
 - 
Field SummaryFields Modifier and Type Field Description static StringCONFIG_CREDENTIALS_DBThe location of the configuration file that contains the credentials database.
 - 
Constructor SummaryConstructors Constructor Description SimpleAuthenticator()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description AuthenticatedUserauthenticate(Map<String,String> credentials)A "standard" authentication implementation that can be used more generically without SASL support.Authenticator.SaslNegotiatornewSaslNegotiator(InetAddress remoteAddress)Provide a SASL handler to perform authentication for an single connection.booleanrequireAuthentication()Whether or not the authenticator requires explicit login.voidsetup(Map<String,Object> config)Setup is called once upon system startup to initialize theAuthenticator.
 
- 
- 
- 
Field Detail- 
CONFIG_CREDENTIALS_DBpublic static final String CONFIG_CREDENTIALS_DB The location of the configuration file that contains the credentials database.- See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
requireAuthenticationpublic boolean requireAuthentication() Description copied from interface:AuthenticatorWhether or not the authenticator requires explicit login. If false will instantiate user with AuthenticatedUser.ANONYMOUS_USER.- Specified by:
- requireAuthenticationin interface- Authenticator
 
 - 
setuppublic void setup(Map<String,Object> config) Description copied from interface:AuthenticatorSetup is called once upon system startup to initialize theAuthenticator.- Specified by:
- setupin interface- Authenticator
 
 - 
newSaslNegotiatorpublic Authenticator.SaslNegotiator newSaslNegotiator(InetAddress remoteAddress) Description copied from interface:AuthenticatorProvide a SASL handler to perform authentication for an single connection. SASL is a stateful protocol, so a new instance must be used for each authentication attempt.- Specified by:
- newSaslNegotiatorin interface- Authenticator
- Parameters:
- remoteAddress- the IP address of the client to authenticate to authenticate or null if an internal client (one not connected over the remote transport).
 
 - 
authenticatepublic AuthenticatedUser authenticate(Map<String,String> credentials) throws AuthenticationException Description copied from interface:AuthenticatorA "standard" authentication implementation that can be used more generically without SASL support. This implementation is used when a particularChannelizerdoesn't support SASL directly (like basic HTTP authentication).- Specified by:
- authenticatein interface- Authenticator
- Throws:
- AuthenticationException
 
 
- 
 
-