Package org.ldaptive.transport
Class ScramSaslClient
java.lang.Object
org.ldaptive.transport.ScramSaslClient
- All Implemented Interfaces:
SaslClient<ScramBindRequest>
SASL client that implements the SCRAM protocol. See RFC 5802.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static class
Properties associated with the final client message.(package private) static class
Properties associated with the client first message.(package private) static class
Verifies the final server message.(package private) static class
Properties associated with the first server response. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final org.slf4j.Logger
Logger for this class. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbind
(TransportConnection conn, ScramBindRequest request) Performs a SCRAM SASL bind.private static byte[]
createDigest
(String algorithm, byte[] data) Digests the supplied data using the supplied algorithm.private static Mac
Creates a new MAC using the supplied algorithm and key.
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGERLogger for this class.
-
-
Constructor Details
-
ScramSaslClient
public ScramSaslClient()
-
-
Method Details
-
bind
Performs a SCRAM SASL bind.- Specified by:
bind
in interfaceSaslClient<ScramBindRequest>
- Parameters:
conn
- to perform the bind onrequest
- SASL request to perform- Returns:
- final result of the bind process
- Throws:
LdapException
- if an error occurs
-
createMac
Creates a new MAC using the supplied algorithm and key.- Parameters:
algorithm
- of the MACkey
- to seed the MAC- Returns:
- new mac
-
createDigest
Digests the supplied data using the supplied algorithm.- Parameters:
algorithm
- of the digestdata
- to digest- Returns:
- digested data
-