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: NameIdentifierMapper.java,v 1.4 2008/08/19 19:11:14 veiming Exp $
026 *
027 */
028/**
029 * Portions Copyrighted 2013 ForgeRock AS
030 */
031package com.sun.identity.saml.plugins;
032
033import com.sun.identity.saml.assertion.NameIdentifier;
034import com.sun.identity.saml.common.SAMLException;
035
036/**
037 * The class <code>NameIdentifierMapper</code> is an interface
038 * that is implemented to map user account to name identifier in
039 * assertion subject in OpenAM.
040 *
041 * @supported.all.api
042 */
043public interface NameIdentifierMapper {
044
045    /**
046     * Returns name identifier for assertion subject based on user account in
047     * the data store.
048     *
049     * @param session the session of the user performing the SSO operation.
050     * @param sourceID source ID for the site from which the assertion
051     *        originated.
052     * @param destID destination ID for the site for which the assertion will be
053     *        created.
054     * @param nameIDFormat The NameID-Format.
055     * @return a <code>NameIdentifier</code> for assertion subject.
056     * @exception SAMLException if an error occurs
057     */
058    public NameIdentifier getNameIdentifier(Object session, String sourceID,
059        String destID, String nameIDFormat) throws SAMLException;
060}