001/**
002 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
003 *
004 * Copyright (c) 2007 Sun Microsystems Inc. All Rights Reserved
005 *
006 * The contents of this file are subject to the terms
007 * of the Common Development and Distribution License
008 * (the License). You may not use this file except in
009 * compliance with the License.
010 *
011 * You can obtain a copy of the License at
012 * https://opensso.dev.java.net/public/CDDLv1.0.html or
013 * opensso/legal/CDDLv1.0.txt
014 * See the License for the specific language governing
015 * permission and limitations under the License.
016 *
017 * When distributing Covered Code, include this CDDL
018 * Header Notice in each file and include the License file
019 * at opensso/legal/CDDLv1.0.txt.
020 * If applicable, add the following below the CDDL Header,
021 * with the fields enclosed by brackets [] replaced by
022 * your own identifying information:
023 * "Portions Copyrighted [year] [name of copyright owner]"
024 *
025 * $Id: ClientUserToken.java,v 1.5 2008/08/27 19:05:53 mrudul_uchil Exp $
026 *
027 */
028
029package com.sun.identity.wss.sts;
030
031import com.sun.xml.ws.security.Token;
032import org.w3c.dom.Element;
033
034/**
035 * This class extends XWSS Security Token and enables the STS Clients to
036 * use any custom tokens that can be used in WS-Trust protocol element
037 * <code>OnBehalfOf</code>. This element is used by the OpenSSO
038 * STS Service to allow any custom changes to the issued tokens by the STS.
039 * 
040 * This is also known as End user token conversion interface (SPI) that can
041 * be implemented by any custom token implementation to convert any custom 
042 * end user token to the token issued by Security Token Service. In this case,
043 * the identity or the owner of the token generated by STS, would be same as
044 * the End user token.
045 * 
046 * The implementation of this interface can be configured at global Security
047 * Token Service configuration (via Admin Console) for server side and in 
048 * client's AMConfig.properties for client side.
049 * 
050 * @supported.all.api
051 */
052public interface ClientUserToken extends Token {
053    
054    /**
055     * Initializes client user token.
056     * @param obj credential object to initialize the user token     
057     * @throws com.sun.identity.wss.sts.FAMSTSException
058     */
059    public void init(Object obj) throws FAMSTSException;
060    
061    /**
062     * Parses the custom token element. This method is used at the 
063     * receiving end (STS server side).
064     * @param element the custom token element
065     * @throws com.sun.identity.wss.sts.FAMSTSException
066     */
067    public void parse(Element element) throws FAMSTSException;
068
069    /**
070     * Returns the principal name that the client user token carries.
071     * @return the principal name that the client user token carries
072     * @throws com.sun.identity.wss.sts.FAMSTSException
073     */     
074    public String getPrincipalName() throws FAMSTSException;
075
076    /**
077     * Returns the <code>java.lang.String</code> representation of
078     * this client user token.
079     * @return the string format for this client user token.
080     */
081    public String toString();
082
083}




























































Copyright © 2010-2017, ForgeRock All Rights Reserved.