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 029package com.sun.identity.saml.plugins; 030 031import com.sun.identity.plugin.session.SessionManager; 032import com.sun.identity.plugin.session.SessionException; 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 OpenSSO. 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 * @return a <code>NameIdentifier</code> for assertion subject. 055 * @exception SAMLException if an error occurs 056 */ 057 public NameIdentifier getNameIdentifier(Object session, String sourceID, 058 String destID) throws SAMLException; 059}