Hey Robert, I finally got the Identity Manager token the work with your TOC widget, along with any tokens provided in the config.xml which you have added already. I had to modify the ViewerContainer and made a custom sign in window in order to do it though, along with changed to the TOC widget source code.
I don't think the Esri Flex API v3.1 stores the generated token from the Identity Manager anywhere, so I stored it myself which is why all the other changes were necessary.
Would you like me to share my code with you, or are you figuring out a way to do it without modifying all the other things?