/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2005 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: DSAMECallbackHandler.java,v 1.7 2008/08/19 19:08:54 veiming Exp $
*
* Portions Copyrighted 2014-2015 ForgeRock AS.
*/
/**
* This class is the OpenAM implementation for Java
* <code>CallbackHandler</code> and it can be passed to underlying
* auth services so that it may interact with other components to retrieve
* specific authentication data, such as usernames and passwords, or to display
* certain information, such as error and warning messages.
*/
// this should be read by AuthContext in order to receive
// what callbacks the module needs
// this will be sent by AuthContext for module to read.
new DSAMECallbackHandlerError("return from DSAMECallback");
/**
* Creates <code>DSAMECallbackHandler</code> object and it associates
* login thread and login state with callback hndler
* @param am <code>AMLoginContext</code> for this callback
*/
}
}
/**
* <p> Retrieves or displays the information requested in the
* provided Callbacks.
*
* <p> This method implementation checks the
* instance(s) of the <code>Callback</code> object(s) passed in
* to retrieve or display the requested information.
* @param callbacks an array of <code>Callback</code> objects provided
* by an underlying security service which contains
* the information requested to be retrieved or displayed.
*
* @exception java.io.IOException if an input or output error occurs.
* @exception UnsupportedCallbackException if the implementation of this
* method does not support one or more of the Callbacks
* specified in the <code>callbacks</code> parameter.
*/
throws IOException, UnsupportedCallbackException {
if (debug.messageEnabled()) {
}
} else {
if (am.isPureJAAS()) {
if (debug.messageEnabled()) {
}
// check if the thread had timedout
loginState.setTimedOut(true);
}
// check if there is a timeout
} else {
// check if there is a timeout
} else {
throw HANDLER_ERROR;
}
}
if (debug.messageEnabled()) {
}
if (am.isPureJAAS()) {
}
}
}
/**
* Clones callbacks from cb2 to cb1.
* @param cb1 new callbacks will be cloned from.
* @param cb2 original callbacks will be cloned to.
*/
for (int m = 0; m < len1; m++) {
}
}
} else {
int indx1 = 0;
int indx2 = 0;
indx1 ++;
}
indx2 ++;
}
}
for (int m = 0; m < n; m++ ) {
}
indx1 ++;
indx2 ++;
}
}
}
/**
* Returns timeout value , 60 secs assumed if no timeout value found
* @param callbacks checked for timeout.
* @return timeout value for callbacks.
*/
long pageTimeOut = 60;
}
return pageTimeOut;
}
/**
* Check login time out. LoginTimeoutException will be thrown if the login
* time out has been reached.
* @exception IOException must be thrown if the login timeout
* has been reached.
*/
loginState.setTimedOut(true);
}
}
/**
* This error is used to control the authentication processing: if there is a problem while processing the
* callbacks this error prevents the auth framework consider this error as an authentication module failure.
*/
super(message);
}
//As this is an expected error that's used for flow control, we do not need to populate the stacktrace.
return this;
}
}
}