org.apache.directory.shared.ldap.codec.bind
Class SaslCredentials

java.lang.Object
  extended byorg.apache.directory.shared.asn1.Asn1Object
      extended byorg.apache.directory.shared.ldap.codec.bind.LdapAuthentication
          extended byorg.apache.directory.shared.ldap.codec.bind.SaslCredentials

public class SaslCredentials
extends LdapAuthentication

A ldapObject which stores the SASL authentication of a BindRequest.

Author:
Apache Directory Project

Field Summary
 
Fields inherited from class org.apache.directory.shared.asn1.Asn1Object
parent
 
Constructor Summary
SaslCredentials()
           
 
Method Summary
 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)]
 java.nio.ByteBuffer encode(java.nio.ByteBuffer buffer)
          Encode the sasl authentication to a PDU.
 byte[] getCredentials()
          Get the credentials
 java.lang.String getMechanism()
          Get the mechanism
 void setCredentials(byte[] credentials)
          Set the credentials
 void setMechanism(LdapString mechanism)
          Set the mechanism
 java.lang.String toString()
          Get a String representation of a SaslCredential
 
Methods inherited from class org.apache.directory.shared.asn1.Asn1Object
addLength, getCurrentLength, getExpectedLength, getParent, setCurrentLength, setExpectedLength, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SaslCredentials

public SaslCredentials()
Method Detail

getCredentials

public byte[] getCredentials()
Get the credentials

Returns:
The credentials

setCredentials

public void setCredentials(byte[] credentials)
Set the credentials

Parameters:
credentials - The credentials

getMechanism

public java.lang.String getMechanism()
Get the mechanism

Returns:
The mechanism

setMechanism

public void setMechanism(LdapString mechanism)
Set the mechanism

Parameters:
mechanism - The mechanism

computeLength

public 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)]


encode

public java.nio.ByteBuffer encode(java.nio.ByteBuffer buffer)
                           throws org.apache.directory.shared.asn1.codec.EncoderException
Encode the sasl authentication to a PDU. SimpleAuthentication : 0xA3 L1 0x04 L2 mechanism [0x04 L3 credentials]

Parameters:
buffer - The buffer where to put the PDU
Returns:
The PDU.
Throws:
org.apache.directory.shared.asn1.codec.EncoderException

toString

public java.lang.String toString()
Get a String representation of a SaslCredential

Returns:
A SaslCredential String


Copyright © 2003-2006 . All Rights Reserved.