Hi, Attributes are returned by the CAS server only if you use the SAML endpoint or the new /p3 endpoint (CAS server v4).
For the /p3 endpoint, please change the CAS server url prefix: casRealm.casServerUrlPrefix = https://server.cas.com/p3/. Best regards, Jérôme LELEU Founder of CAS in the cloud: www.casinthecloud.com | Twitter: @leleuj Chairman of CAS: www.jasig.org/cas | Creator of pac4j: www.pac4j.org 2014-09-10 12:30 GMT+02:00 monoam [via Shiro User] < [email protected]>: > hello > i'm using cas-shiro, my CAS fills principals only with userid but i need > other attributes like roles and permissions , i changed CAS > deployerConfigContext.xml for other attributes but it did not work! :/ > help me please :( > > <bean > class="org.springframework.security.cas.userdetails.GrantedAuthorityFromAssertionAttributesUserDetailsService" > id="userDetailsService"> > <constructor-arg> > <list> > <value>authorities</value> > </list> > </constructor-arg> > </bean> > > <!-- Bean that defines the attributes that a service may return. This > example > uses the Stub/Mock version. A real implementation may go > against a database > or LDAP server. The id should remain "attributeRepository" > though. --> > <bean id="attributeRepository" class="{mypackage.myclassname}"> > <constructor-arg index="0" ref="dataSource" /> > <constructor-arg index="1" > value="SELECT * FROM COMMONT_USER WHERE {0}" /> > <property name="authoritiesColumnName" value="ROLES" /> > <property name="queryAttributeMapping"> > <map> > <entry key="username" value="username" /> > </map> > </property> > <property name="resultAttributeMapping"> > <map> > <entry key="username" value="username" /> > <entry key="roles" value="roles" /> > </map> > </property> > </bean> > > > > ------------------------------ > If you reply to this email, your message will be added to the discussion > below: > > http://shiro-user.582556.n2.nabble.com/CAS-Shiro-principals-problem-tp7580205.html > To start a new topic under Shiro User, email > [email protected] > To unsubscribe from Shiro User, click here > <http://shiro-user.582556.n2.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=582556&code=bGVsZXVqQGdtYWlsLmNvbXw1ODI1NTZ8LTExNzY2MzcxMTY=> > . > NAML > <http://shiro-user.582556.n2.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> > -- View this message in context: http://shiro-user.582556.n2.nabble.com/CAS-Shiro-principals-problem-tp7580205p7580206.html Sent from the Shiro User mailing list archive at Nabble.com.
