/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2006 Sun Microsystems Inc. All Rights Reserved
*
* The contents of this file are subject to the terms
* of the Common Development and Distribution License
* (the License). You may not use this file except in
* compliance with the License.
*
* You can obtain a copy of the License at
* See the License for the specific language governing
* permission and limitations under the License.
*
* When distributing Covered Code, include this CDDL
* Header Notice in each file and include the License file
* at opensso/legal/CDDLv1.0.txt.
* If applicable, add the following below the CDDL Header,
* with the fields enclosed by brackets [] replaced by
* your own identifying information:
* "Portions Copyrighted [year] [name of copyright owner]"
*
* $Id: DefaultIDPAccountMapper.java,v 1.9 2008/11/10 22:57:02 veiming Exp $
*
* Portions Copyrighted 2015 ForgeRock AS.
*/
/**
* This class <code>DefaultIDPAccountMapper</code> is the default implementation of the <code>IDPAccountMapper</code>
* that is used to map the <code>SAML</code> protocol objects to the user accounts at the <code>IdentityProvider</code>
* side of SAML v2 plugin.
* Custom implementations may extend from this class to override some of these implementations if they choose to do so.
*/
public DefaultIDPAccountMapper() {
}
try {
} catch (SessionException se) {
}
if (sessionIndex != null) {
if (idpSession != null) {
break;
}
}
}
}
}
if (nameIDValue == null) {
if (nameIDValue == null) {
}
}
} else {
if (nameIDValue == null) {
} else {
}
}
}
return nameID;
}
throws SAML2Exception {
return null;
}
if (hostEntityID == null) {
}
if (remoteEntityID == null) {
}
}
if (debug.messageEnabled()) {
debug.message("DefaultIDPAccountMapper.getIdentity: realm = " + realm + ", hostEntityID = " + hostEntityID
+ ", remoteEntityID = " + remoteEntityID);
}
try {
return dsProvider.getUserID(realm, SAML2Utils.getNameIDKeyMap(nameID, hostEntityID, remoteEntityID, realm,
role));
} catch (DataStoreProviderException dse) {
}
}
/**
* {@inheritDoc}
*
* This implementation first checks whether NameID persistence has been completely disabled at the IdP level
* (idpDisableNameIDPersistence setting), and if not, it will look at the SP configuration as well
* (spDoNotWriteFederationInfo setting).
*
* @param realm {@inheritDoc}
* @param hostEntityID {@inheritDoc}
* @param remoteEntityID {@inheritDoc}
* @param nameIDFormat {@inheritDoc}
* @return {@inheritDoc}
*/
final boolean disableNameIDPersistence = Boolean.parseBoolean(SAML2Utils.getAttributeValueFromSSOConfig(realm,
if (disableNameIDPersistence) {
return false;
}
}
try {
}
} catch (DataStoreProviderException dspe) {
if (debug.warningEnabled()) {
}
}
}
return nameIDValue;
}
if (formatAttributeMap != null) {
return formatAttributeMap;
}
formatAttributeMap = new HashMap<>();
if (index != -1) {
}
}
}
}
return formatAttributeMap;
}
}