following using claims.
You can find an article in  which explains how to retrieve the ID Token and decode it to get the encoded information.
Note: This customization source code is only applicable for WSO2 IS 5.0.0. There are library changes in WSO2 IS 5.1.0.
1. First we have to write a custom handler which implements CustomClaimsCallbackHandler. SAMLAssertionClaimsCallback  is used as the default custom handler.
2. I have written a sample  which embeds the claims to the ID Token.
3. Create the jar file of the custom handler by using “mvn clean install” command.
4. Copy the jar file to <WSO2_IS_HOME>/repository/components/lib directory.
5. Modify the <WSO2_IS_HOME>/repository/conf/identity.xml as follows.
Modify the “IDTokenCustomClaimsCallBackHandler” in “OpenIDConnect” with the fully qualified class name of the custom handler.
6. Start the WSO2 IS Server.
7. Follow  and get the ID Token. Once you decode the ID Token you can get the output as follows.
 – https://svn.wso2.org/repos/wso2/carbon/platform/branches/turing/components/identity/org.wso2.carbon.identity.oauth/4.2.0/src/main/java/org/wso2/carbon/identity/openidconnect/SAMLAssertionClaimsCallback.java