You don't need <cas:proxyGrantingTicket> to have <cas:attributes>

The code you showed has no issue:

> assertion = new AssertionImpl(new AttributePrincipalImpl(principal, 
attributes));

is what you want.

I'd say your pb is that CAS is not sending attributes to your service.
See 
https://apereo.github.io/cas/5.2.x/installation/Configuration-Properties.html#default-bundle
and 
https://apereo.github.io/cas/5.2.x/integration/Attribute-Release-Policies.html

On 25/01/2018 16:22, Sébastien Ragons wrote:
*My problem is that i can't get the attributs in the response *
because Cas30ServiceTicketValidator don't treat it if there is no ticket in the 
response as you can see in
the code of org.jasig.cas.client.validation.Cas20ServiceTicketValidator (github link 
<https://github.com/apereo/java-cas-client/blob/970a0f5db9a2cc96704ad3a5043994dc8bcfe212/cas-client-core/src/main/java/org/jasig/cas/client/validation/Cas20ServiceTicketValidator.java>)

     protected final Assertion parseResponseFromServer(final String response) 
throws TicketValidationException {
          ................     ...

*  if (CommonUtils.isNotBlank(proxyGrantingTicket)) {*
*        final AttributePrincipal attributePrincipal = new 
AttributePrincipalImpl(principal, attributes,*
*                    proxyGrantingTicket, this.proxyRetriever);*
*            assertion = new AssertionImpl(attributePrincipal);*
*        } else {*
*            assertion = new AssertionImpl(new 
AttributePrincipalImpl(principal, attributes));*
*        }*

        ............
     }



--
Pascal Rigaux

Expert en développement et déploiement d'applications
DSIUN-SAS (service applications et services numériques)
Université Paris 1 Panthéon-Sorbonne  -  Centre Pierre Mendès France (PMF)
B 407 - 90, rue de Tolbiac -  75634 PARIS CEDEX 13 - FRANCE
Tél : 01 44 07 86 59

--
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
--- You received this message because you are subscribed to the Google Groups "CAS Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/4563ffa2-67ae-ef59-d1c0-2cb9abb86cda%40univ-paris1.fr.

Reply via email to