| | |
| | | public BindRequestProtocolOp(ASN1OctetString dn, int protocolVersion, |
| | | ASN1OctetString simplePassword) |
| | | { |
| | | |
| | | this.dn = dn; |
| | | this.protocolVersion = protocolVersion; |
| | | this.simplePassword = simplePassword; |
| | |
| | | public BindRequestProtocolOp(ASN1OctetString dn, String saslMechanism, |
| | | ASN1OctetString saslCredentials) |
| | | { |
| | | |
| | | this.dn = dn; |
| | | this.saslMechanism = saslMechanism; |
| | | this.saslCredentials = saslCredentials; |
| | |
| | | String saslMechanism, |
| | | ASN1OctetString saslCredentials) |
| | | { |
| | | |
| | | this.dn = dn; |
| | | this.protocolVersion = protocolVersion; |
| | | this.authenticationType = authenticationType; |
| | |
| | | */ |
| | | public ASN1OctetString getDN() |
| | | { |
| | | |
| | | return dn; |
| | | } |
| | | |
| | |
| | | */ |
| | | public void setDN(ASN1OctetString dn) |
| | | { |
| | | |
| | | this.dn = dn; |
| | | } |
| | | |
| | |
| | | */ |
| | | public int getProtocolVersion() |
| | | { |
| | | |
| | | return protocolVersion; |
| | | } |
| | | |
| | |
| | | */ |
| | | public void setProtocolVersion(int protocolVersion) |
| | | { |
| | | |
| | | this.protocolVersion = protocolVersion; |
| | | } |
| | | |
| | |
| | | */ |
| | | public AuthenticationType getAuthenticationType() |
| | | { |
| | | |
| | | return authenticationType; |
| | | } |
| | | |
| | |
| | | */ |
| | | public void setAuthenticationType(AuthenticationType authenticationType) |
| | | { |
| | | |
| | | this.authenticationType = authenticationType; |
| | | } |
| | | |
| | |
| | | */ |
| | | public ASN1OctetString getSimplePassword() |
| | | { |
| | | |
| | | return simplePassword; |
| | | } |
| | | |
| | |
| | | */ |
| | | public void setSimplePassword(ASN1OctetString simplePassword) |
| | | { |
| | | |
| | | this.simplePassword = simplePassword; |
| | | authenticationType = AuthenticationType.SIMPLE; |
| | | saslMechanism = null; |
| | |
| | | */ |
| | | public String getSASLMechanism() |
| | | { |
| | | |
| | | return saslMechanism; |
| | | } |
| | | |
| | |
| | | */ |
| | | public ASN1OctetString getSASLCredentials() |
| | | { |
| | | |
| | | return saslCredentials; |
| | | } |
| | | |
| | |
| | | public void setSASLAuthenticationInfo(String saslMechanism, |
| | | ASN1OctetString saslCredentials) |
| | | { |
| | | |
| | | this.saslMechanism = saslMechanism; |
| | | this.saslCredentials = saslCredentials; |
| | | authenticationType = AuthenticationType.SASL; |
| | |
| | | */ |
| | | public byte getType() |
| | | { |
| | | |
| | | return OP_TYPE_BIND_REQUEST; |
| | | } |
| | | |
| | |
| | | */ |
| | | public String getProtocolOpName() |
| | | { |
| | | |
| | | return "Bind Request"; |
| | | } |
| | | |
| | |
| | | */ |
| | | public ASN1Element encode() |
| | | { |
| | | |
| | | ArrayList<ASN1Element> elements = new ArrayList<ASN1Element>(3); |
| | | |
| | | elements.add(new ASN1Integer(protocolVersion)); |
| | |
| | | public static BindRequestProtocolOp decodeBindRequest(ASN1Element element) |
| | | throws LDAPException |
| | | { |
| | | |
| | | ArrayList<ASN1Element> elements; |
| | | try |
| | | { |
| | |
| | | */ |
| | | public void toString(StringBuilder buffer) |
| | | { |
| | | |
| | | buffer.append("BindRequest(version="); |
| | | buffer.append(protocolVersion); |
| | | buffer.append(", dn="); |
| | |
| | | */ |
| | | public void toString(StringBuilder buffer, int indent) |
| | | { |
| | | |
| | | StringBuilder indentBuf = new StringBuilder(indent); |
| | | for (int i=0 ; i < indent; i++) |
| | | { |