Package com.mapr.security.maprauth
Class MaprAuthenticator
- java.lang.Object
-
- org.apache.hadoop.security.authentication.client.AbstractMaprAuthenticator
-
- com.mapr.security.maprauth.MaprAuthenticator
-
- All Implemented Interfaces:
org.apache.hadoop.security.authentication.client.Authenticator
public class MaprAuthenticator extends org.apache.hadoop.security.authentication.client.AbstractMaprAuthenticator
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringNEGOTIATEHTTP header prefix used by the MAPR client/server endpoints during an authentication sequence.static java.lang.StringWWW_ERR_AUTHENTICATEHTTP header used by the MAPR server endpoint during an authentication sequence in case of error
-
Constructor Summary
Constructors Constructor Description MaprAuthenticator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidauthenticate(java.net.URL url, org.apache.hadoop.security.authentication.client.AuthenticatedURL.Token token)authenticate function is invoked when the client tries to open a HTTP connection with the server Based on the header returned by the server we will either do a Mapr handshake or simply fallback to the PseudoAuthenticatorvoidsetConnectionConfigurator(org.apache.hadoop.security.authentication.client.ConnectionConfigurator configurator)
-
-
-
Field Detail
-
WWW_ERR_AUTHENTICATE
public static final java.lang.String WWW_ERR_AUTHENTICATE
HTTP header used by the MAPR server endpoint during an authentication sequence in case of error- See Also:
- Constant Field Values
-
NEGOTIATE
public static final java.lang.String NEGOTIATE
HTTP header prefix used by the MAPR client/server endpoints during an authentication sequence.- See Also:
- Constant Field Values
-
-
Method Detail
-
authenticate
public void authenticate(java.net.URL url, org.apache.hadoop.security.authentication.client.AuthenticatedURL.Token token) throws java.io.IOException, org.apache.hadoop.security.authentication.client.AuthenticationExceptionauthenticate function is invoked when the client tries to open a HTTP connection with the server Based on the header returned by the server we will either do a Mapr handshake or simply fallback to the PseudoAuthenticator- Specified by:
authenticatein interfaceorg.apache.hadoop.security.authentication.client.Authenticator- Specified by:
authenticatein classorg.apache.hadoop.security.authentication.client.AbstractMaprAuthenticator- Parameters:
url- - Server urltoken- - Once authenticated this token can be used for future connections without having to go through the negotiation protocol- Throws:
java.io.IOExceptionorg.apache.hadoop.security.authentication.client.AuthenticationException
-
setConnectionConfigurator
public void setConnectionConfigurator(org.apache.hadoop.security.authentication.client.ConnectionConfigurator configurator)
- Specified by:
setConnectionConfiguratorin interfaceorg.apache.hadoop.security.authentication.client.Authenticator- Specified by:
setConnectionConfiguratorin classorg.apache.hadoop.security.authentication.client.AbstractMaprAuthenticator
-
-