Search in sources :

Example 1 with SessionListener

use of com.iplanet.dpro.session.SessionListener in project OpenAM by OpenRock.

the class SSOTokenImpl method addSSOTokenListener.

/**
     * Adds a sso token listener for the token change events.
     *
     * @param listener
     *            A reference to a SSOTokenListener object.
     * @throws SSOException if the SSOToken is not VALID or if
     *         there are errors in adding the sso token listener.
     */
public void addSSOTokenListener(SSOTokenListener listener) throws SSOException {
    if (!ldapConnect) {
        try {
            SessionListener ssoListener = new SSOSessionListener(listener);
            session.addSessionListener(ssoListener);
        } catch (Exception e) {
            SSOProviderImpl.debug.error("Couldn't add listener to the token" + getTokenID().toString());
            throw new SSOException(e);
        }
    }
}
Also used : SSOException(com.iplanet.sso.SSOException) SessionListener(com.iplanet.dpro.session.SessionListener) LoginException(javax.security.auth.login.LoginException) InvalidAuthContextException(com.sun.identity.authentication.internal.InvalidAuthContextException) SSOException(com.iplanet.sso.SSOException) NoSuchProviderException(java.security.NoSuchProviderException) SessionException(com.iplanet.dpro.session.SessionException)

Example 2 with SessionListener

use of com.iplanet.dpro.session.SessionListener in project OpenAM by OpenRock.

the class StatelessSSOToken method addSSOTokenListener.

@Override
public void addSSOTokenListener(SSOTokenListener listener) throws SSOException {
    try {
        SessionListener ssoListener = new SSOSessionListener(listener);
        session.addSessionListener(ssoListener);
    } catch (Exception e) {
        DEBUG.error("Couldn't add listener to the token {}", session.getID(), e);
        throw new SSOException(e);
    }
}
Also used : SSOException(com.iplanet.sso.SSOException) SessionListener(com.iplanet.dpro.session.SessionListener) SSOSessionListener(com.iplanet.sso.providers.dpro.SSOSessionListener) SSOException(com.iplanet.sso.SSOException) SessionException(com.iplanet.dpro.session.SessionException) SSOSessionListener(com.iplanet.sso.providers.dpro.SSOSessionListener)

Aggregations

SessionException (com.iplanet.dpro.session.SessionException)2 SessionListener (com.iplanet.dpro.session.SessionListener)2 SSOException (com.iplanet.sso.SSOException)2 SSOSessionListener (com.iplanet.sso.providers.dpro.SSOSessionListener)1 InvalidAuthContextException (com.sun.identity.authentication.internal.InvalidAuthContextException)1 NoSuchProviderException (java.security.NoSuchProviderException)1 LoginException (javax.security.auth.login.LoginException)1