OIDC with bypassApprovalPrompt

102 views
Skip to first unread message

Charl Thiem

unread,
Aug 25, 2020, 7:56:02 AM8/25/20
to cas-...@apereo.org
Hi

I'm using CAS 6.1.7 with OIDC Server
In my service definition I have

{
  "@class" : "org.apereo.cas.services.OidcRegisteredService",
  "clientId": "client",
  "clientSecret": "secret",
  "serviceId" : "https://the-redirect-uri",
  "name": "Test",
  "id": 1,
  "supportedResponseTypes":  [ "java.util.HashSet", [ "code" ] ],
  "supportedGrantTypes":  [ "java.util.HashSet", [ "authorization_code" ] ],
  "bypassApprovalPrompt" : true,
  "scopes" : [ "java.util.HashSet",
    [  "openid", "email", "offline_access"]
  ]
}

But after sign in I still get this prompt
image.png
Is this screen expected while having bypassApprovalPrompt=true?
I was hoping to avoid this screen.

Regards / Groete
Charl Thiem




See OpenCollab email disclaimer at http://www.opencollab.co.za/email-disclaimer

Charl Thiem

unread,
Aug 31, 2020, 7:37:15 AM8/31/20
to cas-...@apereo.org
I have figured it out.

Turns out our external service using OIDC was sending a param to prompt for consent.
I figured this out by browsing through source code and finding org.apereo.cas.oidc.web.OidcConsentApprovalViewResolver#isConsentApprovalBypassed.

https://cas.domain.co.za/cas/oidc/authorize?prompt=consent&response_type=code&redirect_uri=https://the-redirect-uri&client_id=client&nonce=f19fe52f7d988708bb7bcb51f80984d2&state=27d138365aabe3282e15b4a88999b042&scope=email offline_access openid

Regards / Groete
Charl Thiem



Reply all
Reply to author
Forward
0 new messages