generally speaking, you can invoke authenticate method as follow
Identity identity = Identity.instance();
but check this out
But problem is I am having two applications , one is in jboss seam and another one is in spring if user is on spring application and clicked on a link then on jboss seam application ,I need to pass user name(no password) of jboss seam application and need to invoke authenticate method jboss seam application on clicking of spring application .
Hope you understand the problem .
It can be done by using Seam REST authentication style as I mentioned earlier however, I have no idea how authentication can be done without password. I think you need to reconsider this scenario. a simple case would be for example each click from Spring application send you a token for each user then try to authenticate with this token.