| | |
| | | import org.opends.server.core.networkgroups.NetworkGroup; |
| | | import org.opends.server.loggers.debug.DebugLogger; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.types.*; |
| | | import org.opends.server.types.operation.PreParseBindOperation; |
| | | import org.opends.server.workflowelement.localbackend.*; |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * This class defines an operation that may be used to authenticate a user to |
| | | * the Directory Server. Note that for security restrictions, response messages |
| | |
| | | private static final DebugTracer TRACER = DebugLogger.getTracer(); |
| | | |
| | | // The credentials used for SASL authentication. |
| | | private ASN1OctetString saslCredentials; |
| | | private ByteString saslCredentials; |
| | | |
| | | // The server SASL credentials provided to the client in the response. |
| | | private ASN1OctetString serverSASLCredentials; |
| | | private ByteString serverSASLCredentials; |
| | | |
| | | // The authentication info for this bind operation. |
| | | private AuthenticationInfo authInfo = null; |
| | |
| | | |
| | | if (rawBindDN == null) |
| | | { |
| | | this.rawBindDN = new ASN1OctetString(); |
| | | this.rawBindDN = ByteString.empty(); |
| | | } |
| | | else |
| | | { |
| | |
| | | |
| | | if (simplePassword == null) |
| | | { |
| | | this.simplePassword = new ASN1OctetString(); |
| | | this.simplePassword = ByteString.empty(); |
| | | } |
| | | else |
| | | { |
| | |
| | | public BindOperationBasis(ClientConnection clientConnection, long operationID, |
| | | int messageID, List<Control> requestControls, |
| | | String protocolVersion, ByteString rawBindDN, |
| | | String saslMechanism, ASN1OctetString saslCredentials) |
| | | String saslMechanism, ByteString saslCredentials) |
| | | { |
| | | super(clientConnection, operationID, messageID, requestControls); |
| | | |
| | |
| | | |
| | | if (rawBindDN == null) |
| | | { |
| | | this.rawBindDN = new ASN1OctetString(); |
| | | this.rawBindDN = ByteString.empty(); |
| | | } |
| | | else |
| | | { |
| | |
| | | |
| | | if (bindDN == null) |
| | | { |
| | | rawBindDN = new ASN1OctetString(); |
| | | rawBindDN = ByteString.empty(); |
| | | } |
| | | else |
| | | { |
| | | rawBindDN = new ASN1OctetString(bindDN.toString()); |
| | | rawBindDN = ByteString.valueOf(bindDN.toString()); |
| | | } |
| | | |
| | | if (simplePassword == null) |
| | | { |
| | | this.simplePassword = new ASN1OctetString(); |
| | | this.simplePassword = ByteString.empty(); |
| | | } |
| | | else |
| | | { |
| | |
| | | public BindOperationBasis(ClientConnection clientConnection, long operationID, |
| | | int messageID, List<Control> requestControls, |
| | | String protocolVersion, DN bindDN, |
| | | String saslMechanism, ASN1OctetString saslCredentials) |
| | | String saslMechanism, ByteString saslCredentials) |
| | | { |
| | | super(clientConnection, operationID, messageID, requestControls); |
| | | |
| | |
| | | |
| | | if (bindDN == null) |
| | | { |
| | | rawBindDN = new ASN1OctetString(); |
| | | rawBindDN = ByteString.empty(); |
| | | } |
| | | else |
| | | { |
| | | rawBindDN = new ASN1OctetString(bindDN.toString()); |
| | | rawBindDN = ByteString.valueOf(bindDN.toString()); |
| | | } |
| | | |
| | | responseControls = new ArrayList<Control>(0); |
| | |
| | | { |
| | | if (rawBindDN == null) |
| | | { |
| | | this.rawBindDN = new ASN1OctetString(); |
| | | this.rawBindDN = ByteString.empty(); |
| | | } |
| | | else |
| | | { |
| | |
| | | { |
| | | if (simplePassword == null) |
| | | { |
| | | this.simplePassword = new ASN1OctetString(); |
| | | this.simplePassword = ByteString.empty(); |
| | | } |
| | | else |
| | | { |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public final ASN1OctetString getSASLCredentials() |
| | | public final ByteString getSASLCredentials() |
| | | { |
| | | return saslCredentials; |
| | | } |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public final void setSASLCredentials(String saslMechanism, |
| | | ASN1OctetString saslCredentials) |
| | | ByteString saslCredentials) |
| | | { |
| | | this.saslMechanism = saslMechanism; |
| | | this.saslCredentials = saslCredentials; |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public final ASN1OctetString getServerSASLCredentials() |
| | | public final ByteString getServerSASLCredentials() |
| | | { |
| | | return serverSASLCredentials; |
| | | } |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public final void setServerSASLCredentials(ASN1OctetString |
| | | public final void setServerSASLCredentials(ByteString |
| | | serverSASLCredentials) |
| | | { |
| | | this.serverSASLCredentials = serverSASLCredentials; |