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.HTTPOauth2FileAuthorizationMechanismCfg;
023
024
025
026/**
027 * A client-side interface for reading and modifying HTTP Oauth2 File
028 * Authorization Mechanism settings.
029 * <p>
030 * The HTTP Oauth2 File Authorization Mechanism is used to define
031 * OAuth2 authorization through a file based access-token resolution.
032 * For test purpose only, this mechanism is looking up for JSON
033 * access-token files under the specified path.
034 */
035public interface HTTPOauth2FileAuthorizationMechanismCfgClient extends HTTPOauth2AuthorizationMechanismCfgClient {
036
037  /**
038   * Get the configuration definition associated with this HTTP Oauth2 File Authorization Mechanism.
039   *
040   * @return Returns the configuration definition associated with this HTTP Oauth2 File Authorization Mechanism.
041   */
042  ManagedObjectDefinition<? extends HTTPOauth2FileAuthorizationMechanismCfgClient, ? extends HTTPOauth2FileAuthorizationMechanismCfg> definition();
043
044
045
046  /**
047   * Gets the "access-token-directory" property.
048   * <p>
049   * Directory containing token files. File names must be equal to the
050   * token strings. The file content must a JSON object with the
051   * following attributes: 'scope', 'expireTime' and all the field(s)
052   * needed to resolve the authzIdTemplate.
053   *
054   * @return Returns the value of the "access-token-directory" property.
055   */
056  String getAccessTokenDirectory();
057
058
059
060  /**
061   * Sets the "access-token-directory" property.
062   * <p>
063   * Directory containing token files. File names must be equal to the
064   * token strings. The file content must a JSON object with the
065   * following attributes: 'scope', 'expireTime' and all the field(s)
066   * needed to resolve the authzIdTemplate.
067   *
068   * @param value The value of the "access-token-directory" property.
069   * @throws PropertyException
070   *           If the new value is invalid.
071   */
072  void setAccessTokenDirectory(String value) throws PropertyException;
073
074
075
076  /**
077   * Gets the "java-class" property.
078   * <p>
079   * Specifies the fully-qualified name of the Java class that
080   * provides the HTTP Oauth2 File Authorization Mechanism
081   * implementation.
082   *
083   * @return Returns the value of the "java-class" property.
084   */
085  String getJavaClass();
086
087
088
089  /**
090   * Sets the "java-class" property.
091   * <p>
092   * Specifies the fully-qualified name of the Java class that
093   * provides the HTTP Oauth2 File Authorization Mechanism
094   * implementation.
095   *
096   * @param value The value of the "java-class" property.
097   * @throws PropertyException
098   *           If the new value is invalid.
099   */
100  void setJavaClass(String value) throws PropertyException;
101
102}