public class SaslCredentials extends LdapAuthentication
parent
Constructor and Description |
---|
SaslCredentials() |
Modifier and Type | Method and Description |
---|---|
int |
computeLength()
Compute the Sasl authentication length
Sasl authentication :
0xA3 L1
0x04 L2 mechanism
[0x04 L3 credentials]
L2 = Length(mechanism)
L3 = Length(credentials)
L1 = L2 + L3
Length(Sasl authentication) = Length(0xA3) + Length(L1) +
Length(0x04) + Length(L2) + Length(mechanism)
[+ Length(0x04) + Length(L3) + Length(credentials)]
|
ByteBuffer |
encode(ByteBuffer buffer)
Encode the sasl authentication to a PDU.
|
byte[] |
getCredentials()
Get the credentials
|
String |
getMechanism()
Get the mechanism
|
void |
setCredentials(byte[] credentials)
Set the credentials
|
void |
setMechanism(String mechanism)
Set the mechanism
|
String |
toString()
Get a String representation of a SaslCredential
|
addLength, getCurrentLength, getExpectedLength, getParent, getTlvId, setCurrentLength, setExpectedLength, setParent
public byte[] getCredentials()
public void setCredentials(byte[] credentials)
credentials
- The credentialspublic String getMechanism()
public void setMechanism(String mechanism)
mechanism
- The mechanismpublic int computeLength()
computeLength
in interface Asn1Object
computeLength
in class AbstractAsn1Object
public ByteBuffer encode(ByteBuffer buffer) throws EncoderException
encode
in interface Asn1Object
encode
in class AbstractAsn1Object
buffer
- The buffer where to put the PDUEncoderException
- if the buffer can't be encodedCopyright © 2003–2015 The Apache Software Foundation. All rights reserved.