001: /*
002: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
003: *
004: * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
005: *
006: * The contents of this file are subject to the terms of either the GNU
007: * General Public License Version 2 only ("GPL") or the Common Development
008: * and Distribution License("CDDL") (collectively, the "License"). You
009: * may not use this file except in compliance with the License. You can obtain
010: * a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html
011: * or glassfish/bootstrap/legal/LICENSE.txt. See the License for the specific
012: * language governing permissions and limitations under the License.
013: *
014: * When distributing the software, include this License Header Notice in each
015: * file and include the License file at glassfish/bootstrap/legal/LICENSE.txt.
016: * Sun designates this particular file as subject to the "Classpath" exception
017: * as provided by Sun in the GPL Version 2 section of the License file that
018: * accompanied this code. If applicable, add the following below the License
019: * Header, with the fields enclosed by brackets [] replaced by your own
020: * identifying information: "Portions Copyrighted [year]
021: * [name of copyright owner]"
022: *
023: * Contributor(s):
024: *
025: * If you wish your version of this file to be governed by only the CDDL or
026: * only the GPL Version 2, indicate your decision by adding "[Contributor]
027: * elects to include this software in this distribution under the [CDDL or GPL
028: * Version 2] license." If you don't indicate a single choice of license, a
029: * recipient has the option to distribute your version of this file under
030: * either the CDDL, the GPL Version 2 or to extend the choice of license to
031: * its licensees as provided above. However, if you add GPL Version 2 code
032: * and therefore, elected the GPL Version 2 license, then the option applies
033: * only if the new code is made subject to such option by the copyright
034: * holder.
035: */
036:
037: /*
038: * STSConfiguration.java
039: *
040: * Created on January 23, 2007, 1:19 PM
041: *
042: */
043:
044: package com.sun.xml.ws.api.security.trust.config;
045:
046: import javax.security.auth.callback.CallbackHandler;
047:
048: import java.util.Map;
049:
050: /** This interface contains the attributes for configuring an STS.
051: *
052: * @author Jiandong Guo
053: */
054: public interface STSConfiguration {
055:
056: /**
057: * Gets the implementation class of <code>WSTrustContract</code> for this STS.
058: *
059: * @return class name
060: */
061: String getType();
062:
063: /**
064: * Get the Issuer for the STS which is a unique string identifing the STS.
065: *
066: */
067: String getIssuer();
068:
069: /**
070: * Retruns true if the issued tokens from this STS must be encrypted.
071: *
072: */
073: boolean getEncryptIssuedToken();
074:
075: /**
076: * Retruns true if the issued keys from this STS must be encrypted.
077: *
078: */
079: boolean getEncryptIssuedKey();
080:
081: long getIssuedTokenTimeout();
082:
083: /**
084: * Set <code>CallbackHandler</code> for handling certificates for the
085: * service provider and keys for the STS.
086: *
087: */
088: void setCallbackHandler(CallbackHandler callbackHandler);
089:
090: /**
091: * Gets a map that contains attributes that aren't bound to any typed property on this class.
092: *
093: * <p>
094: * the map is keyed by the name of the attribute and
095: * the value is any object.
096: *
097: * the map returned by this method is live, and you can add new attribute
098: * by updating the map directly.
099: *
100: *
101: * @return
102: * always non-null
103: */
104: Map<String, Object> getOtherOptions();
105:
106: /**
107: * Get <code>CallbackHandler</code> for handling certificates for the
108: * service provider and keys for the STS.
109: *
110: */
111: CallbackHandler getCallbackHandler();
112:
113: /**
114: * Add <code>TrustMetadata</code> for the service provider as identified by the given
115: * end point.
116: */
117: void addTrustSPMetadata(TrustSPMetadata data, String spEndpoint);
118:
119: /**
120: * Get <code>TrustMetadata</code> for the service provider as identified by the given
121: * end point.
122: */
123: TrustSPMetadata getTrustSPMetadata(String spEndpoint);
124: }
|