package com.sun.ssoadapter;
import com.iplanet.sso.SSOToken;
import com.iplanet.sso.SSOTokenEvent;
import com.sun.ssoadapter.SSOAdapter;
import com.sun.ssoadapter.AbstractSSOAdapter;
import com.sun.ssoadapter.SSOAdapterException;
import com.sun.ssoadapter.SSOAdapterLogger;
import java.util.List;
import java.util.Iterator;
import java.util.Locale;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.Properties;
/*
* This class is a generic SSOAdapter.
*
*/
/**
* A GenericSSOAdapter, it is created when no ssoClassName is provided.
*/
class GenericSSOAdapter extends AbstractSSOAdapter {
/**
* Logs data
*/
private static Logger logger = SSOAdapterLogger.getLogger("com.sun.portal.ssoadapter.impl");
/**
* Constructor
*/
public GenericSSOAdapter() {
}
/*
* Initialize and validate SSOAdapter
*
* @param adapterName Used to identify the SSOAdapter
* @param token Used to identify the user on who's behalf the request is
* being processed.
* @param adapterProperties Contains the adapter information that will drive
* the operation of this instance of an SSOAdapter.
*/
/**
* iny called by SSOAdapterFactory
* @param adapterName
* @param token
* @param adapterProperties
* @param userPropertiesList
* @param encodedProperteisList
* @param locale
* @throws com.sun.ssoadapter.SSOAdapterException
*/
public void init(String adapterName, SSOToken token, Properties adapterProperties,
List userPropertiesList,
List encodedPropertiesList,
Locale locale)
throws SSOAdapterException {
super.init(adapterName, token, adapterProperties,userPropertiesList,encodedPropertiesList,locale);
if (logger.isLoggable(Level.INFO)) {
Properties dp = new Properties();
dp.putAll(adapterProperties);
dp.remove(PROP_PASSWORD_NAME);
dp.remove("proxyAdminPassword");
Iterator iter = encodedPropertiesList.iterator();
while ( iter.hasNext() ) {
String key = (String)iter.next();
dp.remove(key);
}
String [] param = new String [5];
param[0] = adapterName;
param[1] = (String)dp.toString();
param[2] = identifier;
param[3] = userPropertiesList.toString();
param[4] = encodedPropertiesList.toString();
logger.log(Level.INFO, "PSSA_CSSI0001", param);
}
}
/*
* Adapter specific Connection.
*
* @return Object of adapter specific connection.
*/
/**
*
* @return
*/
public Object getConnection() {
return null;
}
/*
* Adapter specific Connection termination.
*
* @return true if the connection was terminated successfully.
*/
/**
*
* @return
*/
public boolean closeConnection() {
return true;
}
/**
* Implements SSOTokenListener "ssoTokenChanged" method.
*
* The following are possible SSO token event types:
* <ul>
* <li>SSO_TOKEN_IDLE_TIMEOUT
* <li>SSO_TOKEN_MAX_TIMEOUT
* <li>SSO_TOKEN_DESTROY
* </ul>
*
* @param evt SSOTokenEvent
*/
public void ssoTokenChanged(SSOTokenEvent evt) {
}
}
|