| Constructor and Description |
|---|
ServerSaslPeer(javax.security.sasl.SaslServer saslServer) |
| 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).
|
byte[] |
unwrap(byte[] data,
int offset,
int length)
Unwrap protected data to raw bytes.
|
byte[] |
wrap(byte[] data,
int offset,
int length)
Wrap raw bytes to protect it.
|
public byte[] evaluate(byte[] negotiationMessage)
throws TSaslNegotiationException
SaslPeerevaluate in interface SaslPeernegotiationMessage - response/challenge received from peer.TSaslNegotiationException - if sasl authentication fails.public boolean isAuthenticated()
isAuthenticated in interface SaslPeerpublic boolean isDataProtected()
SaslPeerisDataProtected in interface SaslPeerpublic byte[] wrap(byte[] data,
int offset,
int length)
throws TTransportException
SaslPeerwrap in interface SaslPeerdata - raw bytes.offset - the start position of the content to wrap.length - the length of the content to wrap.TTransportException - if failure.public byte[] unwrap(byte[] data,
int offset,
int length)
throws TTransportException
SaslPeerunwrap in interface SaslPeerdata - 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.