Add support for OAUTH2 device flow (RFC 8628)#302
Add support for OAUTH2 device flow (RFC 8628)#302a-ilin wants to merge 1 commit intosimonrob:mainfrom
Conversation
|
Thanks for the work adding this feature. I'll need time to review it - hopefully in the next few weeks. |
|
Thanks in advance! Soon I will add one more PR based on the changes from this one, to complete the authorization use case for headless servers. |
|
I had a look at this just now. I had to adjust your approach a little in order to maintain GUI compatibility. I also tried to stick to the current architecture of the proxy more closely where possible. Because the commits in your branch aren't signed (so can't be merged), I made a new branch: device-authorisation-grant. Could you take a look? |
|
Thank you for the rework! I had a look over the changed implementation, and verified the case with The only issue I noticed in the code is that the |
|
Thanks for taking a look, and for spotting the optionality of the interval – ab0fbd3 re-adds this. I'll go ahead and merge this new feature now. |
Hi! Thank you for the great tool!
Could you please take a look at this PR?
Description
This PR adds support for OAUTH2 device flow:
Device flow is particularly useful on headless systems, as it does not require usage of the redirect URL.
I successfully tested this PR with a free Microsoft account (
outlook.com), and own applicationclient_id.The application (
client_id) must be explicitly allowed to use the device flow in the Azure console.Implementation
The following properties are introduced into the request propagated from OAUTH2 to the main app:
need_response: A boolean specifying the flow implies a response from a user to be provided to the proxy in order to retrieve the tokens. It isfalsefor device flow, andtruefor others.user_code: A (short) string, which should be provided to the user for authentication at the service provider. User should manually enter it at the provider's web page.The following changes are done to the UI, both graphical and console:
QA
I tested the proxy on Linux systems, in container and on desktop.
The following test cases are successful:
Attention! On my systems I cannot make GUI work at all (even without my changes). The icon in the tray is always frozen, without notifications, and without context menu.
Therefore I cannot validate that the changes are correct for GUI interaction.