001/**
002 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
003 *
004 * Copyright (c) 2008 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: ConsumerSiteAttributeMapper.java,v 1.3 2009/01/21 19:04:34 weisun2 Exp $
026 *
027 */
028
029
030package com.sun.identity.saml.plugins;
031
032import com.sun.identity.saml.common.SAMLException;
033import javax.servlet.http.HttpServletRequest;
034import javax.servlet.http.HttpServletResponse;
035import java.util.List;
036
037/**
038 * This interface needs to be implemented by an trusted assertion consumer site 
039 * (a partner) to return a list of <code>Attribute</code> objects to be
040 * returned as <code>AttributeStatements</code> elements, as part of the
041 * Authentication Assertion returned to the partner during the
042 * SSO scenario of Browser Artifact and POST profile.
043 * <p>
044 * Different partner would need to have a different implementation
045 * of the interface. The mappings between the partner source ID and
046 * the implementation class are configured at the <code>Partner URLs</code>
047 * field in SAML service.
048 *
049 * @supported.all.api
050 */
051public interface ConsumerSiteAttributeMapper {
052
053    /**
054     * Returns <code>List</code> of <code>Attribute</code> objects
055     *
056     * @param token  User's session.
057     * @param request The HttpServletRerquest object of the request which
058     *                may contains query attributes to be included in the
059     *                Assertion. This could be null if unavailable.
060     * @param response The HttpServletResponse object. This could be null 
061     *                if unavailable.
062     * @param targetURL value for TARGET query parameter when the user
063     *                  accessing the SAML aware servlet or post profile
064     *                  servlet. This could be null if unavailabl
065     * @return <code>List</code> if <code>Attribute</code> objects.
066     *         <code>Attribute</code> is defined in the SAML SDK as part of
067     *         <code>com.sun.identity.saml.assertion</code> package.
068     * @throws SAMLException if attributes cannot be obtained.
069     */
070    public List getAttributes(Object token, HttpServletRequest request,
071        HttpServletResponse response, String targetURL)
072        throws SAMLException;
073}




























































Copyright © 2010-2017, ForgeRock All Rights Reserved.