001/**
002 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
003 *
004 * Copyright (c) 2006 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: SPAccountMapper.java,v 1.5 2008/08/19 19:11:15 veiming Exp $
026 *
027 */
028
029
030package com.sun.identity.saml2.plugins;
031
032import com.sun.identity.saml2.common.SAML2Exception;
033
034/**
035 * The interface <code>SPAccountMapper</code> is used to identify the
036 * local identities that maps the <code>SAML</code> protocol objects such as
037 * <code>Assertion</code>, <code>ManageNameIDRequest</code> etc.
038 * This mapper interface is used to map the identities only at the
039 * <code>SAMLAssertionConsumer</code>, in otherwords, 
040 * <code>ServiceProvider</code> version of the <code>SAML</code> provider. 
041 * The implementation of this interface will be used by the <code>SAML</code>
042 * framework to retrieve the user identity information for the consumption
043 * of generating a user session, or manage the user account information while
044 * handling the <code>SAML</code> protocols and it is <code>pluggable</code>
045 * through local configuration in the <code>SAML2</code> plugin.
046 *
047 * The implementation of this interface may need to consider the
048 * deployment of the SAML v2 plugin for example on the OpenSSO
049 * platform or on Federation Manager.
050 * @see com.sun.identity.saml2.plugins.IDPAccountMapper
051 *
052 * @supported.all.api
053 */ 
054public interface SPAccountMapper {
055
056    /**
057     * Returns the user's disntinguished name or the universal ID for the 
058     * corresponding  <code>SAML</code> <code>Assertion</code>. This method
059     * will be invoked by the <code>SAML</code> framework while processing
060     * the <code>Assertion</code> and retrieves the identity information. 
061     *
062     * @param assertion <code>SAML</code> <code>Assertion</code> that needs
063     *        to be mapped to the user.
064     * @param hostEntityID <code>EntityID</code> of the hosted provider.
065     * @param realm realm or the organization name that may be used to find
066     *        the user information.
067     * @return user's disntinguished name or the universal ID.
068     * @exception SAML2Exception if any failure.
069     */
070    public java.lang.String getIdentity(
071        com.sun.identity.saml2.assertion.Assertion assertion,
072        java.lang.String hostEntityID,
073        java.lang.String realm
074    ) throws SAML2Exception;
075
076
077    /**
078     * Returns the user's disntinguished name or the universal ID for the 
079     * corresponding  <code>SAML</code> <code>ManageNameIDRequest</code>.
080     * This method will be invoked by the <code>SAML</code> framework for
081     * retrieving the user identity while processing the
082     * <code>ManageIDRequest</code>. 
083     * @param manageNameIDRequest <code>SAML</code> 
084     *     <code>ManageNameIDRequest</code> that needs to be mapped to the user.
085     * @param hostEntityID <code>EntityID</code> of the hosted provider.
086     * @param realm realm or the organization name that may be used to find
087     *        the user information.
088     * @return user's disntinguished name or the universal ID.
089     * @exception SAML2Exception if any failure.
090     */
091    public java.lang.String getIdentity(
092        com.sun.identity.saml2.protocol.ManageNameIDRequest manageNameIDRequest,
093        java.lang.String hostEntityID,
094        java.lang.String realm
095    ) throws SAML2Exception;
096
097}




























































Copyright © 2010-2017, ForgeRock All Rights Reserved.