I am using the below configuration to successfully get AD attribute values 
and I could see those values in log file.

    <util:map id="authenticationHandlersResolvers">
        <entry key-ref="proxyAuthenticationHandler" 
value-ref="proxyPrincipalResolver" />
        <entry key-ref="primaryAuthenticationHandler" 
value-ref="primaryPrincipalResolver" />
        <entry key-ref="ldapAuthenticationHandler" value="#{null}" />
    </util:map>

    <bean id="ldapAuthenticationHandler" 
class="org.jasig.cas.authentication.LdapAuthenticationHandler"
      p:principalIdAttribute="sAMAccountName"
      c:authenticator-ref="authenticator">
      <property name="principalAttributeMap">
        <map>
            <entry key="displayName" value="simpleName" />
            <entry key="mail" value="email" />
        </map>
      </property>
    </bean>

but in browser,
https://demo.ssoserver.com:8443/cas/oauth2.0/profile?access_token={testtoken......}

only return {"id":"testuser","attributes":[{"error":"invalid_request. 
null"}]}, I can't see mail and displayName.

OAuthCallbackurl-10000009.json
{
  "@class": 
"org.jasig.cas.support.oauth.services.OAuthCallbackAuthorizeService",
  "serviceId": "https://demo.ssoserver:8443/cas/oauth2.0/callbackAuthorize";,
  "name":" OAuth Callback url",
  "id": 10000009,
  "description": "OAuth Wrapper Callback Url",
  "logoutType": "BACK_CHANNEL",
  "accessStrategy":
  {
    "@class": 
"org.jasig.cas.services.DefaultRegisteredServiceAccessStrategy",
    "enabled": true,
    "ssoEnabled": true,
    "caseInsensitive": false
  },
  "usernameAttributeProvider" : {
    "@class" : 
"org.jasig.cas.services.PrincipalAttributeRegisteredServiceUsernameProvider",
    "usernameAttribute" : "email",
    "usernameAttribute" : "simpleName"
  },
  "attributeReleasePolicy" : {
    "@class" : "org.jasig.cas.services.ReturnAllAttributeReleasePolicy"
  }
}

-- 
CAS gitter chatroom: https://gitter.im/apereo/cas
CAS mailing list guidelines: https://apereo.github.io/cas/Mailing-Lists.html
CAS documentation website: https://apereo.github.io/cas
CAS project website: https://github.com/apereo/cas
--- 
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 post to this group, send email to [email protected].
Visit this group at https://groups.google.com/a/apereo.org/group/cas-user/.
To view this discussion on the web visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/9effa31c-85ba-482d-9c59-4d961c63d67f%40apereo.org.
For more options, visit https://groups.google.com/a/apereo.org/d/optout.

Reply via email to