Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implements the device authorisation flow #114

Merged
merged 2 commits into from
Jun 4, 2023

Conversation

ljyanesm
Copy link
Contributor

  • Adds support for OAuth 2.0 Device Authorization Grant
  • Updates core/mod.rs to include the new CoreDeviceAuthorizationResponse type
  • Updates lib.rs to provide access to DeviceAuthorizationUrl and DeviceAuthorizationRequest types
  • Adds set_device_authorization_uri method to the Client API to set the URL for contacting the device authorization endpoint
  • Implements an example that showcases the process of using the device grant flow to obtain an ID token from the Okta provider. The example demonstrates device code exchange for an access token.

Solves #113

* Adds support for OAuth 2.0 Device Authorization Grant
* Updates `core/mod.rs` to include the new `CoreDeviceAuthorizationResponse` type
* Updates `lib.rs` to provide access to `DeviceAuthorizationUrl` and `DeviceAuthorizationRequest` types
* Adds `set_device_authorization_uri` method to the `Client` API to set the URL for contacting the device authorization endpoint
* Implements an example that showcases the process of using the device grant flow to obtain an ID token from the Okta provider. The example demonstrates device code exchange for an access token.

Solves ramosbugs#113
@codecov
Copy link

codecov bot commented Jun 3, 2023

Codecov Report

Merging #114 (a2af2d2) into main (eb15817) will decrease coverage by 0.49%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##             main     #114      +/-   ##
==========================================
- Coverage   73.92%   73.43%   -0.49%     
==========================================
  Files          17       17              
  Lines        4092     4107      +15     
==========================================
- Hits         3025     3016       -9     
- Misses       1067     1091      +24     
Impacted Files Coverage Δ
src/core/mod.rs 53.76% <ø> (ø)
src/lib.rs 66.66% <0.00%> (-6.21%) ⬇️

Copy link
Owner

@ramosbugs ramosbugs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the PR!

src/core/mod.rs Outdated Show resolved Hide resolved
src/lib.rs Outdated Show resolved Hide resolved
src/lib.rs Outdated Show resolved Hide resolved
src/lib.rs Outdated Show resolved Hide resolved
src/lib.rs Outdated Show resolved Hide resolved
src/lib.rs Outdated Show resolved Hide resolved
src/lib.rs Outdated Show resolved Hide resolved
src/core/mod.rs Outdated Show resolved Hide resolved
examples/okta_device_grant.rs Outdated Show resolved Hide resolved
examples/okta_device_grant.rs Outdated Show resolved Hide resolved
@ramosbugs thanks for the review!
@ramosbugs ramosbugs merged commit 9f63cd8 into ramosbugs:main Jun 4, 2023
@ramosbugs
Copy link
Owner

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants