001/*
002 * The contents of this file are subject to the terms of the Common Development and
003 * Distribution License (the License). You may not use this file except in compliance with the
004 * License.
005 *
006 * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
007 * specific language governing permission and limitations under the License.
008 *
009 * When distributing Covered Software, include this CDDL Header Notice in each file and include
010 * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
011 * Header, with the fields enclosed by brackets [] replaced by your own identifying
012 * information: "Portions Copyright [year] [name of copyright owner]".
013 *
014 * Copyright 2008 Sun Microsystems, Inc.
015 */
016package org.forgerock.opendj.server.config.client;
017
018
019
020import org.forgerock.opendj.config.ManagedObjectDefinition;
021import org.forgerock.opendj.config.PropertyException;
022import org.forgerock.opendj.server.config.server.HTTPBasicAuthorizationMechanismCfg;
023
024
025
026/**
027 * A client-side interface for reading and modifying HTTP Basic
028 * Authorization Mechanism settings.
029 * <p>
030 * The HTTP Basic Authorization Mechanism authenticates the end-user
031 * using credentials extracted from the HTTP Basic 'Authorization'
032 * header.
033 */
034public interface HTTPBasicAuthorizationMechanismCfgClient extends HTTPAuthorizationMechanismCfgClient {
035
036  /**
037   * Get the configuration definition associated with this HTTP Basic Authorization Mechanism.
038   *
039   * @return Returns the configuration definition associated with this HTTP Basic Authorization Mechanism.
040   */
041  ManagedObjectDefinition<? extends HTTPBasicAuthorizationMechanismCfgClient, ? extends HTTPBasicAuthorizationMechanismCfg> definition();
042
043
044
045  /**
046   * Gets the "alt-authentication-enabled" property.
047   * <p>
048   * Specifies whether user credentials may be provided using
049   * alternative headers to the standard 'Authorize' header.
050   *
051   * @return Returns the value of the "alt-authentication-enabled" property.
052   */
053  boolean isAltAuthenticationEnabled();
054
055
056
057  /**
058   * Sets the "alt-authentication-enabled" property.
059   * <p>
060   * Specifies whether user credentials may be provided using
061   * alternative headers to the standard 'Authorize' header.
062   *
063   * @param value The value of the "alt-authentication-enabled" property.
064   * @throws PropertyException
065   *           If the new value is invalid.
066   */
067  void setAltAuthenticationEnabled(boolean value) throws PropertyException;
068
069
070
071  /**
072   * Gets the "alt-password-header" property.
073   * <p>
074   * Alternate HTTP headers to get the user's password from.
075   *
076   * @return Returns the value of the "alt-password-header" property.
077   */
078  String getAltPasswordHeader();
079
080
081
082  /**
083   * Sets the "alt-password-header" property.
084   * <p>
085   * Alternate HTTP headers to get the user's password from.
086   *
087   * @param value The value of the "alt-password-header" property.
088   * @throws PropertyException
089   *           If the new value is invalid.
090   */
091  void setAltPasswordHeader(String value) throws PropertyException;
092
093
094
095  /**
096   * Gets the "alt-username-header" property.
097   * <p>
098   * Alternate HTTP headers to get the user's name from.
099   *
100   * @return Returns the value of the "alt-username-header" property.
101   */
102  String getAltUsernameHeader();
103
104
105
106  /**
107   * Sets the "alt-username-header" property.
108   * <p>
109   * Alternate HTTP headers to get the user's name from.
110   *
111   * @param value The value of the "alt-username-header" property.
112   * @throws PropertyException
113   *           If the new value is invalid.
114   */
115  void setAltUsernameHeader(String value) throws PropertyException;
116
117
118
119  /**
120   * Gets the "identity-mapper" property.
121   * <p>
122   * > Specifies the name of the identity mapper used to get the
123   * user's entry corresponding to the user-id provided in the HTTP
124   * authentication header.
125   *
126   * @return Returns the value of the "identity-mapper" property.
127   */
128  String getIdentityMapper();
129
130
131
132  /**
133   * Sets the "identity-mapper" property.
134   * <p>
135   * > Specifies the name of the identity mapper used to get the
136   * user's entry corresponding to the user-id provided in the HTTP
137   * authentication header.
138   *
139   * @param value The value of the "identity-mapper" property.
140   * @throws PropertyException
141   *           If the new value is invalid.
142   */
143  void setIdentityMapper(String value) throws PropertyException;
144
145
146
147  /**
148   * Gets the "java-class" property.
149   * <p>
150   * Specifies the fully-qualified name of the Java class that
151   * provides the HTTP Basic Authorization Mechanism implementation.
152   *
153   * @return Returns the value of the "java-class" property.
154   */
155  String getJavaClass();
156
157
158
159  /**
160   * Sets the "java-class" property.
161   * <p>
162   * Specifies the fully-qualified name of the Java class that
163   * provides the HTTP Basic Authorization Mechanism implementation.
164   *
165   * @param value The value of the "java-class" property.
166   * @throws PropertyException
167   *           If the new value is invalid.
168   */
169  void setJavaClass(String value) throws PropertyException;
170
171}