/**
* 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: SSOTokenSampleServlet.java,v 1.4 2008/10/29 03:16:04 veiming Exp $
*
*/
/**
* Portions Copyrighted 2013-2016 ForgeRock AS.
*/
/**
* This Sample serves as a basis for using SSO API. It demonstrates creating
* a SSO Token, calling various methods from the token, setting up event
* listeners and getting called on event listeners.
*
* @see com.iplanet.sso.SSOToken
* @see com.iplanet.sso.SSOTokenID
* @see com.iplanet.sso.SSOTokenManager
* @see com.iplanet.sso.SSOTokenEvent
* @see com.iplanet.sso.SSOTokenListener
*/
}
try {
try {
// create the sso token from http request
//print some of the values from the token.
}
/* Validate the token again, with another method.
* if token is invalid, this method throws exception
*/
// Get the SSOTokenID associated with the token and print it.
// Set and get some properties in the token.
// Retrieve user profile and print them
/* let us add a listener to the SSOToken. Whenever a token
* event arrives, ssoTokenChanged method of the listener will
* get called.
*/
} catch (SSOTokenListenersUnsupportedException e) {
e.printStackTrace();
} catch (SSOException e) {
e.printStackTrace();
} catch (IdRepoException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
} finally {
}
} catch (IOException e) {
// ignored
}
}
}