OIDC with 7.3 and code

122 views
Skip to first unread message

Vallee Romain

unread,
Jul 17, 2026, 7:32:33 AM (8 days ago) Jul 17
to CAS Community

Hello,

I migrated from version 6 to latest version 7 of Jasig, and since then, my services that use OIDC authentication no longer work. We're getting this error message:

Argument #2 ($code) must be of type string, null given, called in .

I tried adapting my services using this syntax:

root@cas7:/etc/cas/config# cat ../services/centreon-16.json


{

“@class”: “org.apereo.cas.services.OidcRegisteredService”,

“clientId”: “xxxxx”,

“clientSecret”: “xxxxx”,

“serviceId”: “http://192.168.14.159/centreon/authentication/providers/configurations/openid”,

“evaluationOrder”: 1,

“name”: “centreon”,

“id”: 16,

“bypassApprovalPrompt”: true,

“accessStrategy”: {

“@class”: “org.apereo.cas.services.DefaultRegisteredServiceAccessStrategy”,

“enabled”: true,

“ssoEnabled”: true,

“requireAllAttributes”: false,

“requiredAttributes”: {

“@class”: “java.util.HashMap”

},

“caseInsensitive”: false

},

“userProfileViewType”: “FLAT”,

“supportedGrantTypes”: [“java.util.HashSet”, [“authorization_code”]],

“supportedResponseTypes”: [“java.util.HashSet”, [“code”]],

“scopes”: [“java.util.HashSet”, [“openid”,“profile”,“email”,‘groups’,“roles”]],

“includeClaimsInIdToken”: true

}


The logs don't show anything unusual.


Have you ever encountered this problem?


Thank you

Best regards


Vallee Romain

unread,
Jul 18, 2026, 2:06:20 PM (7 days ago) Jul 18
to CAS Community, Vallee Romain
Thank to @JeromeLeleu .

Just add this :

cas.authn.oauth.session-replication.cookie.crypto.enabled=true

Now, i have to find how create à json service file to bring attributs to application.

Could someone provide me with an example of a JSON file that would work with OIDC? One that sends attributes?

Ray Bon

unread,
Jul 19, 2026, 4:18:00 PM (6 days ago) Jul 19
to cas-...@apereo.org
Vallee,

Not all of the properties in the service are required.
There are also some custom scopes.

Ray

{
  "@class": "org.apereo.cas.services.OidcRegisteredService",
  "name": "Demo-OIDC",
  "id": 10002,
  "proxyTicketExpirationPolicy":
  {
    "@class": "org.apereo.cas.services.DefaultRegisteredServiceProxyTicketExpirationPolicy"
  },
  "serviceTicketExpirationPolicy":
  {
    "@class": "org.apereo.cas.services.DefaultRegisteredServiceServiceTicketExpirationPolicy"
  },
  "singleSignOnParticipationPolicy": {
    "@class": "org.apereo.cas.services.ChainingRegisteredServiceSingleSignOnParticipationPolicy"
  },
  "evaluationOrder": 145,
  "usernameAttributeProvider": {
    "@class": "org.apereo.cas.services.DefaultRegisteredServiceUsernameProvider",
    "canonicalizationMode": "LOWER"
  },
  "environments": null,
  "multifactorPolicy": {
    "@class": "org.apereo.cas.services.DefaultRegisteredServiceMultifactorPolicy",
    "multifactorAuthenticationProviders": null,
    "bypassEnabled": true
  },
  "attributeReleasePolicy":
  {
    "@class": "org.apereo.cas.services.DenyAllAttributeReleasePolicy"
  },
  "clientSecret": "secret",
  "clientId": "demoId",
  "bypassApprovalPrompt": false,
  "generateRefreshToken": true,
  "jwtAccessToken": true,
  "supportedGrantTypes":
  [
    "java.util.HashSet",
    [
      "refresh_token",
      "password",
      "authorization_code"
    ]
  ],
  "supportedResponseTypes":
  [
    "java.util.HashSet",
    [
      "code",
      "id_token",
      "token"
    ]
  ],
  "signIdToken": false,
  "subjectType": "PUBLIC",
  "scopes": [
    "java.util.HashSet", [
      "uvicApplications",
      "openid",
      "email",
      "profile",
      "eduPerson"
    ]
  ]
}


From: cas-...@apereo.org <cas-...@apereo.org> on behalf of Vallee Romain <vallee...@gmail.com>
Sent: July 18, 2026 01:47
To: CAS Community <cas-...@apereo.org>
Cc: Vallee Romain <vallee...@gmail.com>
Subject: [cas-user] Re: OIDC with 7.3 and code
 
You don't often get email from vallee...@gmail.com. Learn why this is important
--
- Website: https://apereo.github.io/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 visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/c45ceb63-1a05-4e22-a608-8e62519fc514n%40apereo.org.

Vallee Romain

unread,
Jul 20, 2026, 9:21:53 AM (5 days ago) Jul 20
to CAS Community, Ray Bon

Thanks for your configuration file.


I notice that the “openid” and “profile” scopes aren't returning any attributes.

In my application-side logs, only the email address is being logged.

Do I need to declare something?

Vallee Romain

unread,
Jul 21, 2026, 9:45:12 AM (4 days ago) Jul 21
to CAS Community, Vallee Romain, Ray Bon
It's ok !

My applications needed to receive the data in “flat” format.
Thank for all

Jonathon Taylor

unread,
Jul 24, 2026, 6:52:40 PM (23 hours ago) Jul 24
to cas-...@apereo.org, Vallee Romain, Ray Bon
We ran into a similar issue early on with our OIDC implementation where CAS returns attributes in a "nested" format by default.  We found that nearly all applications that want the userInfo payload expected the opposite so we changed the default behavior to return "flat" rather than under an "attributes" block.  Cloud providers like Okta, Entra, as well as the wordpress providers all broke if we kept the default.  

cas.authn.oauth.core.user-profile-view-type=FLAT



--
Jonathon Taylor
Information Security Office | University of California, Berkeley
Reply all
Reply to author
Forward
0 new messages