/**
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2007 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: ReplayPasswd.java,v 1.6 2009/11/04 22:50:35 manish_rustagi Exp $
*
* Portions Copyrighted 2011-2016 ForgeRock AS.
*/
/**
* This class is used to set the encrypted password as a session property.
* It reads the value of the property "com.sun.am.replaypasswd.key" which is
* the key that is to be used for DES Encryption. Once the password is
* encrypted, it assigns a session property "sunIdentityUserPassword" with
* this value.
* This class is also used to set "sharepoint_login_attr_value" as a session
* property to support Sharepoint. It reads the value of the property
* "com.sun.am.sharepoint_login_attr_name" which indicates the user token that
* Sharepoint uses for authentication and gets its corresponding attribute
* value from the user datastore.It will then put this as a value of
* "sharepoint_login_attr_value" session property.
* This class also sets the "owaAuthCookie" for the all the domains for which
* "iPlanetdirectoryPro" cookie is set.
*/
"com.sun.am.replaypasswd.key";
"sunIdentityUserPassword";
"com.sun.am.iis_owa_enabled";
"owaAuthCookie";
"amOwaValue";
"com.sun.am.sharepoint_login_attr_name";
"sharepoint_login_attr_value";
/**
* Post processing on successful authentication.
* @param requestParamsMap contains HttpServletRequest parameters
* @param request HttpServlet request
* @param response HttpServlet response
* @param ssoToken user's session
* @throws AuthenticationException if there is an error while setting
* the session password property
*/
return;
}
if (debug.messageEnabled()) {
}
try {
if (requestParamsMap == null) {
} else {
} else if (debug.warningEnabled()) {
}
} else if (debug.warningEnabled()) {
}
}
// Set OWA Auth Cookie
}
}
if (strAttributeValue != null) {
}
if (debug.messageEnabled()) {
}
}
if (debug.messageEnabled()) {
}
} catch (IdRepoException ire) {
} catch (NoSuchAlgorithmException noe) {
+ " while setting session password property: " + noe);
} catch (InvalidKeyException ike) {
+ "while setting session password property: " + ike);
} catch (IllegalBlockSizeException ibe) {
+ " while setting session password property: " + ibe);
} catch (NoSuchPaddingException npe) {
+ "while setting session password property: " + npe);
} catch (BadPaddingException bpe) {
+ "while setting session password property: " + bpe);
} catch (SSOException sse) {
+ sse);
}
}
/**
* Post processing on failed authentication.
* @param requestParamsMap contains HttpServletRequest parameters
* @param req HttpServlet request
* @param res HttpServlet response
* @throws AuthenticationException if there is an error
*/
}
/**
* Post processing on Logout.
* @param req HttpServlet request
* @param res HttpServlet response
* @param ssoToken user's session
* @throws AuthenticationException if there is an error
*/
}
/**
* Encrypts the provided password.
* @param userpasswd the password
* @return the encrypted password
* @throws NoSuchAlgorithmException
* @throws NoSuchPaddingException
* @throws InvalidKeyException
* @throws IllegalBlockSizeException
* @throws BadPaddingException
* @throws SSOException
*/
private String encryptPassword(String userpasswd) throws NoSuchAlgorithmException, NoSuchPaddingException,
if (debug.messageEnabled()) {
}
return null;
}
// The array size must be a multiply of 8 (DES block size)
}
}