mirror of
https://github.com/OMGeeky/yup-oauth2.git
synced 2026-01-04 10:20:26 +01:00
47b68cf4010974b1ea834b292d9b9101d15a6c46
Due to https://github.com/rust-lang/rust/issues/22252, r-value temporaries outlive the lifetimes of variables bound with let statements in a function body. Because of this, device.rs fails to compile against newer rustc nightlies. This implements a simple workaround that binds the result of the match in `request_code` to a local variable before returning it. This allows it to have the same lifetime as `req` in one of the previous let bindings.
yup-oauth2 is a utility library which will implement oauthv2 device authentication suitable for yup to work.
It is implemented such that it makes no assumptions about the front-end, allowing more uses than just in yup.
Usage
Please have a look at the API landing page for all the examples you will ever need.
A simple commandline program which authenticates any scope and prints token information can be found in the examples directory.
The video below shows the auth example in action. It's meant to be used as utility to record all server communication and improve protocol compliance.
Description
Languages
Rust
99.2%
Shell
0.8%
