CAS Unable to parse my ReturnAllowedAttributeReleasePolicy

74 views
Skip to first unread message

Giovan Isa Musthofa

unread,
Aug 25, 2020, 4:36:32 AM8/25/20
to CAS Community

Hi,

I have my service registry in a rest endpoint. I have make sure the allowedAttributes
field similar to the documented syntax of ["java.util.ArrayList", ["cn", "mail", "sn"]].

Screenshot_2020-08-25 Read Only Rest Service Registry List – Django REST framework.png

But, I got this error.

Caused by: com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize instance of `java.lang.String` out of START_ARRAY token at [Source: UNKNOWN; line: -1, column: -1] (through reference chain: org.apereo.cas.support.oauth.services.OAuthRegisteredService["attributeReleasePolicy"]>org.apereo.cas.services.ReturnAllowedAttributeReleasePolicy["allowedAttributes"]->java.util.ArrayList[1])

Can anyone point what could be wrong? I can provide more information if needed.

Regards,
Giovan

Jérôme LELEU

unread,
Aug 25, 2020, 4:49:39 AM8/25/20
to cas-...@apereo.org
Hi,

Indeed, it feels good. I would try to directly have the array:

"attributeReleasePolicy" : {
    "@class" : "org.apereo.cas.services.ReturnMappedAttributeReleasePolicy",
    "allowedAttributes" : [ "username", "email"]
  }


Thanks.
Best regards,
Jérôme


--
- 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 cas-user+u...@apereo.org.
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/34a640fa-5122-4e02-8752-64a47b6e8db9n%40apereo.org.

Giovan Isa Musthofa

unread,
Aug 25, 2020, 5:04:35 AM8/25/20
to CAS Community, leleuj
Thank you, Sir! It works!
Reply all
Reply to author
Forward
0 new messages