public interface SaslPeer
| Modifier and Type | Method and Description |
|---|---|
void |
dispose()
Close this peer and release resources.
|
byte[] |
evaluate(byte[] negotiationMessage)
Evaluate and validate the negotiation message (response/challenge) received from peer.
|
boolean |
isAuthenticated() |
boolean |
isDataProtected()
This method can only be called when the negotiation is complete (isAuthenticated returns true).
|
default byte[] |
unwrap(byte[] data)
Unwrap the whole byte array.
|
byte[] |
unwrap(byte[] data,
int offset,
int length)
Unwrap protected data to raw bytes.
|
default byte[] |
wrap(byte[] data)
Wrap the whole byte array.
|
byte[] |
wrap(byte[] data,
int offset,
int length)
Wrap raw bytes to protect it.
|
byte[] evaluate(byte[] negotiationMessage)
throws TSaslNegotiationException
negotiationMessage - response/challenge received from peer.TSaslNegotiationException - if sasl authentication fails.boolean isAuthenticated()
boolean isDataProtected()
java.lang.IllegalStateException - if negotiation is not yet complete.byte[] wrap(byte[] data,
int offset,
int length)
throws TTransportException
data - raw bytes.offset - the start position of the content to wrap.length - the length of the content to wrap.TTransportException - if failure.default byte[] wrap(byte[] data)
throws TTransportException
data - raw bytes.TTransportException - if failure.byte[] unwrap(byte[] data,
int offset,
int length)
throws TTransportException
data - protected data received from peer.offset - the start position of the content to unwrap.length - the length of the content to unwrap.TTransportException - if failed.default byte[] unwrap(byte[] data)
throws TTransportException
data - wrapped bytes.TTransportException - if failure.void dispose()