# Class SaslQuorumAuthLearner

java.lang.Object
org.apache.zookeeper.server.quorum.auth.SaslQuorumAuthLearner

All Implemented Interfaces:
  `QuorumAuthLearner`

public class SaslQuorumAuthLearner extends Object implements QuorumAuthLearner

## Constructor Summary

Constructors
Constructor
Description
`SaslQuorumAuthLearner(boolean quorumRequireSasl, String quorumServicePrincipal, String loginContext)`

## Method Summary

Modifier and Type
Method
Description
`void`
`authenticate(Socket sock, String hostName)`
Performs an authentication step for the given socket connection.

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### SaslQuorumAuthLearner

public SaslQuorumAuthLearner(boolean quorumRequireSasl, String quorumServicePrincipal, String loginContext) throws SaslException

Throws:
  `SaslException`

## Method Details

### authenticate

public void authenticate(Socket sock, String hostName) throws IOException
Description copied from interface: `QuorumAuthLearner`
Performs an authentication step for the given socket connection.

Specified by:
  `authenticate` in interface `QuorumAuthLearner`
Parameters:
  `sock` - socket connection to other quorum peer server
  `hostName` - host name of other quorum peer server
Throws:
  `IOException` - if there is an authentication failure