René's URL Explorer Experiment


Title: Keycloak: Adding a custom field for the `token` endpoint POST to get Single-Sign-Off to work · Issue #980 · scribejava/scribejava · GitHub

Open Graph Title: Keycloak: Adding a custom field for the `token` endpoint POST to get Single-Sign-Off to work · Issue #980 · scribejava/scribejava

X Title: Keycloak: Adding a custom field for the `token` endpoint POST to get Single-Sign-Off to work · Issue #980 · scribejava/scribejava

Description: Hi, Keycloak has some non-standard behavior that we need to support: The KEYCLOAK-15234 bug report is about Single-Sign-Off not working with non-Keycloak adapters (like scribejava). Keycloak allows clients to register an "Admin URL" that...

Open Graph Description: Hi, Keycloak has some non-standard behavior that we need to support: The KEYCLOAK-15234 bug report is about Single-Sign-Off not working with non-Keycloak adapters (like scribejava). Keycloak allows...

X Description: Hi, Keycloak has some non-standard behavior that we need to support: The KEYCLOAK-15234 bug report is about Single-Sign-Off not working with non-Keycloak adapters (like scribejava). Keycloak allows...

Opengraph URL: https://github.com/scribejava/scribejava/issues/980

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Keycloak: Adding a custom field for the `token` endpoint POST to get Single-Sign-Off to work","articleBody":"Hi,\r\n\r\nKeycloak has some non-standard behavior that we need to support: The [KEYCLOAK-15234](https://issues.redhat.com/browse/KEYCLOAK-15234) bug report is about Single-Sign-Off not working with non-Keycloak adapters (like scribejava). Keycloak allows clients to register an \"Admin URL\" that gets called when users log off. Unfortunately, it only works when a custom `client_session_state=${sessionId}` POST parameter is added when calling the `token` endpoint to exchange a code for a token.\r\n\r\nThe `OAuth20Service` service currently does not provide any means to add custom parameters to any of the `getAccessToken()` methods.\r\n\r\nThe question is whether we should  provide a PR for this project or work around it in application code. We prefer preparing a PR and I would like to hear the project's opinion on how to proceed. We're happy to provide a PR, but would like the approach to be approved beforehand, so we don't waste effort and end up with a fork that never gets merged. There are at least a couple of ways this could be made possible:\r\n\r\n### Change protected -\u003e public for 4 methods in `OAuth2AccessToken`\r\n\r\nIf the three `sendAccessTokenRequest*` methods and `createAccessTokenRequest` were changed from protected to public, then instead of:\r\n\r\n    OAuth2AccessToken accessToken = service.getAccessToken(code)\r\n\r\nour application code could now:\r\n\r\n    OAuthRequest request = service.createAccessTokenRequest(AccessTokenRequestParams.create(code));\r\n    request.addParameter(\"client_session_state\", sessionId)\r\n    OAuth2AccessToken accessToken = service.sendAccessTokenRequestSync(request)\r\n\r\nIn my opinion this the cleanest, most flexible and most elegant solution, but there is also:\r\n\r\n### A new `KeycloakService` implements `public OAuth2AccessToken getAccessToken*(..., String clientSessionState)` methods\r\n\r\nModify `KeycloakApi` to override method `public OAuth20Service createService` so it creates a `KeycloakService` (like e.g. `FacecbookApi` creates a `FacebookService`). `KeycloakService` then provides a (number of) `public OAuth2AccessToken getAccessToken(String code, String clientSessionState)` method(s) that add the extra parameter.\r\n\r\nThere are already 6 methods with various parameter and sync/async combinations. Should there now be 12? The existing 6 plus versions with the extra parameter? This is a maintainability nightmare... It also makes `getAccessToken` different from e.g. the `revokeToken` family in that respect that \"only\" has 6 variations.\r\n\r\nAlso, `ServiceBuilderOAuth20`'s `build()` method returns a `OAuth20Service` so the application would have to cast the result of `build()` to `KeycloakService` to access these 6 new methods. :-(\r\n\r\n### `OAuth2AccessToken` gets new `getAccessToken(..., Map\u003cString, String\u003e extraParameters)` methods\r\n\r\nHere instead of creating a custom `KeycloakService` we add more generic methods to the base class. Again, we'll end up with 12 methods instead of the current 6.\r\n\r\nI don't like this for the same maintainability reasons.\r\n\r\n### Application Level Workaround - no scribejava changes\r\n\r\nEssentially we derive from KeycloakApi to just provide strictly what we need:\r\n\r\nWe Implement our own `OurKeycloakApi` that returns an `OurKeycloakService` that implements the one extra method we need. That is for sure the easiest for us to do, but it doesn't help out the next Keycloak user that runs into this problem.\r\n\r\nWe'll do this unless there is consensus here on what a PR should look like. We just think it is a shame others have to do similar customizations to get logging out to work properly.","author":{"url":"https://github.com/pmorch","@type":"Person","name":"pmorch"},"datePublished":"2020-08-21T11:08:44.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":6},"url":"https://github.com/980/scribejava/issues/980"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:e23e3ecc-c386-61ed-3632-5f912003a0a4
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idAF84:2BDE8F:213A70C:2EB8745:696F67A9
html-safe-nonce3451450ae23b3fe3c6a2e80639640e7127b498cd25813269fe242d4b3c0765bb
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRjg0OjJCREU4RjoyMTNBNzBDOjJFQjg3NDU6Njk2RjY3QTkiLCJ2aXNpdG9yX2lkIjoiNTc1OTMxMTIwMTgwMjI1OTYxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac8b6029403937da1e3a62fecc6842f39bad2b9cf7aff150fb662e97ad83436b5f
hovercard-subject-tagissue:683484446
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/scribejava/scribejava/980/issue_layout
twitter:imagehttps://opengraph.githubassets.com/8f6573eeeffd4ebd2254f943777b17f42c16227fa27f2f554d3993c12f4f5fa9/scribejava/scribejava/issues/980
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/8f6573eeeffd4ebd2254f943777b17f42c16227fa27f2f554d3993c12f4f5fa9/scribejava/scribejava/issues/980
og:image:altHi, Keycloak has some non-standard behavior that we need to support: The KEYCLOAK-15234 bug report is about Single-Sign-Off not working with non-Keycloak adapters (like scribejava). Keycloak allows...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamepmorch
hostnamegithub.com
expected-hostnamegithub.com
Nonedd6be7b30d2e12704d0d9723ad4a7950f9e3ad8461efc40b5411aad62e847a89
turbo-cache-controlno-preview
go-importgithub.com/scribejava/scribejava git https://github.com/scribejava/scribejava.git
octolytics-dimension-user_id15140551
octolytics-dimension-user_loginscribejava
octolytics-dimension-repository_id889932
octolytics-dimension-repository_nwoscribejava/scribejava
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id889932
octolytics-dimension-repository_network_root_nwoscribejava/scribejava
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release0bab932a9532ed9bc2e3e2614af9348ab39af6a7
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/scribejava/scribejava/issues/980#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fscribejava%2Fscribejava%2Fissues%2F980
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fscribejava%2Fscribejava%2Fissues%2F980
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=scribejava%2Fscribejava
Reloadhttps://github.com/scribejava/scribejava/issues/980
Reloadhttps://github.com/scribejava/scribejava/issues/980
Reloadhttps://github.com/scribejava/scribejava/issues/980
scribejava https://github.com/scribejava
scribejavahttps://github.com/scribejava/scribejava
Please reload this pagehttps://github.com/scribejava/scribejava/issues/980
Notifications https://github.com/login?return_to=%2Fscribejava%2Fscribejava
Fork 1.7k https://github.com/login?return_to=%2Fscribejava%2Fscribejava
Star 5.5k https://github.com/login?return_to=%2Fscribejava%2Fscribejava
Code https://github.com/scribejava/scribejava
Issues 44 https://github.com/scribejava/scribejava/issues
Pull requests 29 https://github.com/scribejava/scribejava/pulls
Actions https://github.com/scribejava/scribejava/actions
Projects 0 https://github.com/scribejava/scribejava/projects
Wiki https://github.com/scribejava/scribejava/wiki
Security Uh oh! There was an error while loading. Please reload this page. https://github.com/scribejava/scribejava/security
Please reload this pagehttps://github.com/scribejava/scribejava/issues/980
Insights https://github.com/scribejava/scribejava/pulse
Code https://github.com/scribejava/scribejava
Issues https://github.com/scribejava/scribejava/issues
Pull requests https://github.com/scribejava/scribejava/pulls
Actions https://github.com/scribejava/scribejava/actions
Projects https://github.com/scribejava/scribejava/projects
Wiki https://github.com/scribejava/scribejava/wiki
Security https://github.com/scribejava/scribejava/security
Insights https://github.com/scribejava/scribejava/pulse
New issuehttps://github.com/login?return_to=https://github.com/scribejava/scribejava/issues/980
New issuehttps://github.com/login?return_to=https://github.com/scribejava/scribejava/issues/980
Keycloak: Adding a custom field for the token endpoint POST to get Single-Sign-Off to workhttps://github.com/scribejava/scribejava/issues/980#top
https://github.com/pmorch
https://github.com/pmorch
pmorchhttps://github.com/pmorch
on Aug 21, 2020https://github.com/scribejava/scribejava/issues/980#issue-683484446
KEYCLOAK-15234https://issues.redhat.com/browse/KEYCLOAK-15234
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.