001/* 002 * CDDL HEADER START 003 * 004 * The contents of this file are subject to the terms of the 005 * Common Development and Distribution License, Version 1.0 only 006 * (the "License"). You may not use this file except in compliance 007 * with the License. 008 * 009 * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt 010 * or http://forgerock.org/license/CDDLv1.0.html. 011 * See the License for the specific language governing permissions 012 * and limitations under the License. 013 * 014 * When distributing Covered Code, include this CDDL HEADER in each 015 * file and include the License file at legal-notices/CDDLv1_0.txt. 016 * If applicable, add the following below this CDDL HEADER, with the 017 * fields enclosed by brackets "[]" replaced with your own identifying 018 * information: 019 * Portions Copyright [yyyy] [name of copyright owner] 020 * 021 * CDDL HEADER END 022 * 023 * 024 * Copyright 2009 Sun Microsystems, Inc. 025 * Portions Copyright 2014 ForgeRock AS 026 */ 027 028package org.forgerock.opendj.ldap.requests; 029 030import java.util.List; 031 032import org.forgerock.opendj.ldap.DecodeException; 033import org.forgerock.opendj.ldap.DecodeOptions; 034import org.forgerock.opendj.ldap.LdapException; 035import org.forgerock.opendj.ldap.controls.Control; 036import org.forgerock.opendj.ldap.controls.ControlDecoder; 037 038/** 039 * The SASL authentication method of the Bind operation allows clients to 040 * authenticate using one of the SASL authentication methods defined in RFC 041 * 4513. 042 * <p> 043 * <TODO>finish doc. 044 * 045 * @see <a href="http://tools.ietf.org/html/rfc4513#section-5.2.1.8">RFC 4513 - 046 * SASL Authorization Identities (authzId) </a> 047 */ 048public interface SASLBindRequest extends BindRequest { 049 050 @Override 051 SASLBindRequest addControl(Control control); 052 053 @Override 054 BindClient createBindClient(String serverName) throws LdapException; 055 056 /** 057 * Returns the authentication mechanism identifier for this SASL bind 058 * request as defined by the LDAP protocol, which is always {@code 0xA3}. 059 * 060 * @return The authentication mechanism identifier. 061 */ 062 @Override 063 byte getAuthenticationType(); 064 065 @Override 066 <C extends Control> C getControl(ControlDecoder<C> decoder, DecodeOptions options) 067 throws DecodeException; 068 069 @Override 070 List<Control> getControls(); 071 072 /** 073 * Returns the name of the Directory object that the client wishes to bind 074 * as, which is always the empty string for SASL authentication. 075 * 076 * @return The name of the Directory object that the client wishes to bind 077 * as. 078 */ 079 @Override 080 String getName(); 081 082 /** 083 * Returns the SASL mechanism for this SASL bind request. 084 * 085 * @return The SASL mechanism for this bind request. 086 */ 087 String getSASLMechanism(); 088 089}