Why and when to perform this task
This task explains how to create your own single signon token implementation, which is set in the login Subject and added to the HTTP response as an HTTP cookie. The cookie name is the concatenation of the SingleSignonToken.getName application programming interface (API) and the SingleSignonToken.getVersion API. There is no delimiter. When you add a single signon token to the Subject, it also gets propagated horizontally and downstream in case the Subject is used for other Web requests. You must deserialize your custom single signon token when you receive it from a propagation login. Consider writing your own implementation if you want to accomplish one of the following tasks:To implement a custom single signon token, you must complete the following steps:
Steps for this task
Many different methods are available for implementing the SingleSignonToken interface. However, make sure the methods that are required by the SingleSignonToken interface and the token interface are fully implemented.
After you implement this interface, you can place it in the install_dir/classes directory. Alternatively, you can place the class in any private directory. However, make sure that the WebSphere Application Server class loader can locate the class and that it is granted the appropriate permissions. You can add the Java archive (JAR) file or directory that contains this class into the server.policy file so that it has the required permissions for the server code.
To see an implementation of the single signon token, see Example: A com.ibm.wsspi.security.token.SingleSignonToken implementation
The code sample in Example: A custom single signon token login module, shows how to determine if the login is an initial login or a propagation login. The difference is whether the WSTokenHolderCallback callback contains propagation data. If the callback does not contain propagation data, initialize a new custom single signon token implementation and set it into the Subject. Also, look for the HTTP cookie from the HTTP request if the HTTP request object is available in the callback. You can get your custom single signon token both from a horizontal propagation login and from the HTTP request. However, it is recommended that you make the token available in both places because then the information arrives at any front-end application server, even if that server does not support propagation.
You can make your single signon token read-only in the commit phase of the login module. If you make the token read-only, additional attributes cannot be added within your applications.
For information on adding your custom login module into the existing login configurations, see Custom login module development for a system login configuration.
Result
After completing these steps, you have implemented a custom single signon token.Related concepts
Security attribute propagation
Related reference
Custom login module development for a system login configuration