Title: Device authorization codes request should include client_secret · Issue #1041 · scribejava/scribejava · GitHub
Open Graph Title: Device authorization codes request should include client_secret · Issue #1041 · scribejava/scribejava
X Title: Device authorization codes request should include client_secret · Issue #1041 · scribejava/scribejava
Description: Currently, the device authorization codes request does not include the client_secret parameter (aka apiKey). The OAuth 2.0 Device Grant RFC states [1]: The client authentication requirements of Section 3.2.1 of [RFC6749] apply to request...
Open Graph Description: Currently, the device authorization codes request does not include the client_secret parameter (aka apiKey). The OAuth 2.0 Device Grant RFC states [1]: The client authentication requirements of Sec...
X Description: Currently, the device authorization codes request does not include the client_secret parameter (aka apiKey). The OAuth 2.0 Device Grant RFC states [1]: The client authentication requirements of Sec...
Opengraph URL: https://github.com/scribejava/scribejava/issues/1041
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Device authorization codes request should include client_secret","articleBody":"Currently, the device authorization codes request does not include the client_secret parameter (aka apiKey).\r\n\r\nThe OAuth 2.0 Device Grant RFC states [1]:\r\n\r\n> The client authentication requirements of [Section 3.2.1 of [RFC6749]](https://datatracker.ietf.org/doc/html/rfc6749#section-3.2.1) apply to requests on this endpoint, which means that confidential clients (those that have established client credentials) authenticate in the same manner as when making requests to the token endpoint...\r\n\r\nHence, the method OAuth20Service#createDeviceAuthorizationCodesRequest(String) should not only set the client_id, but also the client_secret here [2].\r\nImho the line\r\n`request.addParameter(OAuthConstants.CLIENT_ID, getApiKey());`\r\nshould be replaced with:\r\n`api.getClientAuthentication().addClientAuthentication(request, getApiKey(), getApiSecret());`\r\n\r\nI observed this issue when trying to test device authorization with a confidential Keycloak client - I got a Keycloak response 401 with body:\r\n`{\"error\":\"unauthorized_client\",\"error_description\":\"Client secret not provided in request\"}`\r\n\r\n\r\n[1] https://datatracker.ietf.org/doc/html/rfc8628#section-3.1\r\n[2] https://github.com/scribejava/scribejava/blob/3a07d71f50b4f00bfda5fbae0eb765e612529ad9/scribejava-core/src/main/java/com/github/scribejava/core/oauth/OAuth20Service.java#L506","author":{"url":"https://github.com/danielFesenmeyer","@type":"Person","name":"danielFesenmeyer"},"datePublished":"2022-06-30T14:09:43Z","url":"https://github.com/scribejava/scribejava/issues/1041"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:2bc7d90a-e8c0-8db3-6b5c-787a79bdb342 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D8FE:28C95D:A83A2D:F013BA:6AFCB84D |
| html-safe-nonce | 3760863f3ef5d0af1a020ce066c7732c3b0e21047edefb4da512408526b14c95 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEOEZFOjI4Qzk1RDpBODNBMkQ6RjAxM0JBOjZBRkNCODREIiwidmlzaXRvcl9pZCI6IjM3NTk2MTI4ODcyMDc1NTcxOTciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 56b722e38687e8b0773bed01e327c41fb66c7fbced9e07624f402077b483c342 |
| hovercard-subject-tag | issue:1290195135 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/scribejava/scribejava/1041/issue_layout |
| twitter:image | https://opengraph.githubassets.com/52ef7ffab2d0ba671e23e98f2856ebe5e21c0ca570722dac9710daa2db4fe5da/scribejava/scribejava/issues/1041 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/52ef7ffab2d0ba671e23e98f2856ebe5e21c0ca570722dac9710daa2db4fe5da/scribejava/scribejava/issues/1041 |
| og:image:alt | Currently, the device authorization codes request does not include the client_secret parameter (aka apiKey). The OAuth 2.0 Device Grant RFC states [1]: The client authentication requirements of Sec... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | danielFesenmeyer |
| hostname | github.com |
| expected-hostname | github.com |
| None | e3084aead77cbcb4f4904fba53851fa1a0546b0dec3619bd250815e72588dc6d |
| turbo-cache-control | no-preview |
| go-import | github.com/scribejava/scribejava git https://github.com/scribejava/scribejava.git |
| octolytics-dimension-user_id | 15140551 |
| octolytics-dimension-user_login | scribejava |
| octolytics-dimension-repository_id | 889932 |
| octolytics-dimension-repository_nwo | scribejava/scribejava |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 889932 |
| octolytics-dimension-repository_network_root_nwo | scribejava/scribejava |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 5410e4bebd3e45b138c853ecef3992279d86d5af |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width