Hi Dan,

Basically it should work using this code:

        SecurityContext sc = message.get(SecurityContext.class);
        UserPrincipal principal = sc.getUserPrincipal();
        saml = ((SAMLTokenPrincipal) user).getToken();
        List<org.opensaml.saml2.core.Statement> statements = 
saml.getSaml2().getStatements();
        for (Statement s : statements) {
        System.out.println(s.getElementQName());
       }

What is exactly the problem: you cannot access token, it has a not expected 
type or contains no statements?

Regards,
Amdrei.

-----Original Message-----
From: DTaylor [mailto:[email protected]] 
Sent: 09 May 2012 20:37
To: [email protected]
Subject: Accessing Claims in a client

Good afternoon,

I have a requirement to be able to access claims in a client application once a 
security token has been accessed.  I've tried parsing the incoming attribute 
statements out of the message, however by the time I've placed my interceptor 
into the chain it appears that I am unable to access the assertions.

I've also tried retrieving the token from the TokenStore, however I don't 
believe the claims are available through the SecurityToken either.

Is there some easy way to access these in the client so that the information 
can be used?

Thanks,

Dan.


--
View this message in context: 
http://cxf.547215.n5.nabble.com/Accessing-Claims-in-a-client-tp5698187.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to