The "Installed App Flow" requires user interaction; we first generate a
URL that the user has to navigate to. Then, the user either pastes a
displayed code into the app being authorized, or the OAuth provider
redirects the user's browser to a webserver that is running on
localhost. This webserver is provided by the library and the flow should
work automatically. Extensive documentation can be found here:
https://developers.google.com/identity/protocols/OAuth2InstalledApp
An example for the InstalledFlow with the Drive API is here:
https://gist.github.com/dermesser/8c915ec4c88ee8e8927e7d40b276ca52
That way, google-apis-rs can compile once again.
If not done, yup-oauth ends up being compiled with
an older serde (the one of google-apis-rs, it seems), even
though its code was generated by a possibly newer serde.
Signed-off-by: Sebastian Thiel <sthiel@thoughtworks.com>
Versions were chosen to allow for maximum flexibility
for users of this library, even if this breaks at compile time
thanks to incompatibilities in dependencies.
Rather that, than cargo claiming that it cannot use
a certain version.
Of course, once everything is >= 1.0, one can change to
standard semver compatiblity.
As travis-cargo doesn't disable default features, we have to do things
a little more manually. Using a build matrix, we should be able to
control the features precisely.
While at it, we assure docs are only uploaded for the stable version,
not for the nighly one.
Nightly supports additional features, which are now properly named.
The reason for it to fail recently was the default feature name
`unstable`, which is `nightly` in our case.
To make nightly tests work, one will have to do some additional
scripting to call it with the correct features (see makefile).
For now, building it on stable is just fine I think.
As usage of the `!include` macro is enforced, there is currently no way
to use the exported macros from `yup_hyper_mock`. Now some more
boilerplate code was added to make it work anyway.
* Previously the meta-data was applied to the crate, which doesn't seem
to work.
* attempted to make `examples/auth.rs` work on stable. This isn't
properly tested now, as tests don't compile.
We are now at a state were stable as well as nightly work similarly,
but fail because `include!` doesn't behave correctly if macros are
involved. Namely it happens before crates are linked, yet it will
try to expand macros right away, which is a problem.
If the macro is defined in an empty fashion, it will actually be used
at include time, and expanded. Which causes issues further down the
compilation.
With the current 'fix' we manage to at least make everything but
`cargo test` work.
Related to #12
* It should help to keep track of how to properly call cargo in nightly
mode. After all, I have wasted some time, multiple times just trying
to figure out that I forgot to add the nightly feature.
* Slightly improved structure of lib.rs and includes
Related to #12
It doesn't yet work on nightly due to a panic in
https://goo.gl/RyM4GT
Might have something to do with me being on nightly,
and some cargo-related hickoup.