SPAccountMapper.java revision a688bcbb4bcff5398fdd29b86f83450257dc0df4
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster/**
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster *
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Copyright (c) 2007 Sun Microsystems Inc. All Rights Reserved
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster *
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * The contents of this file are subject to the terms
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * of the Common Development and Distribution License
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * (the License). You may not use this file except in
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * compliance with the License.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster *
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * You can obtain a copy of the License at
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * https://opensso.dev.java.net/public/CDDLv1.0.html or
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * opensso/legal/CDDLv1.0.txt
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * See the License for the specific language governing
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * permission and limitations under the License.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster *
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * When distributing Covered Code, include this CDDL
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Header Notice in each file and include the License file
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * at opensso/legal/CDDLv1.0.txt.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * If applicable, add the following below the CDDL Header,
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * with the fields enclosed by brackets [] replaced by
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * your own identifying information:
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * "Portions Copyrighted [year] [name of copyright owner]"
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster *
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * $Id: SPAccountMapper.java,v 1.5 2008/08/19 19:11:16 veiming Exp $
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster *
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster */
e60a1cf74ca44a3bb3e3fe63b106e6ef6dca910fPhill Cunnington
e60a1cf74ca44a3bb3e3fe63b106e6ef6dca910fPhill Cunnington
e60a1cf74ca44a3bb3e3fe63b106e6ef6dca910fPhill Cunningtonpackage com.sun.identity.wsfederation.plugins;
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterimport com.sun.identity.wsfederation.common.WSFederationException;
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterimport com.sun.identity.wsfederation.profile.RequestSecurityTokenResponse;
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster/**
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * The class <code>PartnerAccountMapper</code> is an interface
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * that is implemented to map partner account to user account
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * in OpenSSO.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * <p>
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Different partner would need to have a different implementation
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * of the interface. The mappings between the partner source ID and
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * the implementation class are configured at the <code>Partner URLs</code>
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * field in SAML service.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster *
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @supported.all.api
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster */
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterpublic interface SPAccountMapper {
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster /**
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Returns user's distinguished name or the universal ID for the
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * RSTR. This method will be invoked by the WS-Federation framework
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * while processing the <code>RequestSecurityTokenResponse</code> and
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * retrieves the identity information.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster *
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @param rstr the incoming <code>RequestSecurityTokenResponse</code>
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @param hostEntityID <code>EntityID</code> of the hosted provider.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @param targetURL final target URL.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @return user's disntinguished name or the universal ID.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @exception WSFederationException if any failure.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster */
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster public String getIdentity(RequestSecurityTokenResponse rstr,
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster String hostEntityID, String targetURL) throws WSFederationException;
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster}
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster