Glenn Griffin
e83ec7e25e
Have the installed flow http server always listen on an ephemeral port.
...
Specifying a port of zero has the server listen on an ephemeral port.
Many users may not be aware of that unless they have a background in
networking where that's common practice. I'm also not able to think of
any use cases where listening on a hardcoded port would be beneficial,
so with this change I've opted to remove the ability entirely rather
than simply documenting that almost everybody should specify zero.
2019-08-09 13:59:03 -07:00
Lewin Bormann
58af9fc36b
refactor(deps): Remove dependency on openssl.
2019-08-01 21:32:22 +02:00
Lewin Bormann
c321f6d2e6
fix(ServiceAccount): Make cache behavior more intuitive.
...
Now the cache is only checked for a token when the future is polled, not
at future creation time.
This also allows for reverting c2b41c3 .
2019-06-21 18:41:17 +02:00
Lewin Bormann
c2b41c3da2
fix(test-svc-acct): Non-lazy cache lookup resulted in two requests.
2019-06-21 11:12:59 +02:00
Lewin Bormann
0eb1268567
doc(tokio): Set keep_alive to false on hyper clients.
...
This prevents hanging event loops.
2019-06-13 18:52:04 +02:00
Lewin Bormann
bdb0bd92e7
fix(examples): Update examples to use Authenticator.
2019-06-13 15:32:48 +02:00
Lewin Bormann
46e1f1b880
feat(DeviceFlow): Proper timeout handling for the DeviceFlow.
2019-06-12 19:28:37 +02:00
Lewin Bormann
58383f9a03
refactor(DeviceFlow): Make DeviceFlow work with Futures
2019-06-12 18:43:30 +02:00
Lewin Bormann
732e594962
refactor(InstalledFlow): Implement GetToken for InstalledFlow
2019-06-12 14:40:08 +02:00
Lewin Bormann
59b2b03b7d
rewrite(serviceaccount): Rewrite ServiceAccountAccess to use futures.
...
Also add example/test to check if obtaining tokens using JWTs works.
2019-06-12 13:50:56 +02:00
Lewin Bormann
f3774e4b74
fix(tests): Disable unused tests and fix failing ones.
2019-06-12 00:02:47 +02:00
Lewin Bormann
7c1731cac9
chore(rustfmt): cargo fmt
2019-06-11 23:41:55 +02:00
Lewin Bormann
4b32c0f097
example(installed): Add small example for testing the InstalledFlow
2019-06-11 23:29:58 +02:00
Lewin Bormann
aa6fb4e0b9
chore(syntax): Run rustfmt on examples.
2019-06-09 09:25:29 +02:00
Lewin Bormann
ce9b6d8dd7
chore(syntax): Remove extern crate imports where not needed
2019-06-09 09:24:15 +02:00
Guy Taylor
9f7f3c3b95
Upgrade to Hyper v0.12
...
This upgrade Hyper to v0.12 and updats to code to work for it. It has
being done with the minimum code change and so the logic is still
aukward for the futures model. This should be addressed in later commits
but I did not want to compilcate an already large commit.
2019-05-26 11:08:32 +02:00
Guy Taylor
b96cfcd66a
Format to fustfmt defaults and force lint check in Travis
2019-02-21 20:46:00 +00:00
Lewin Bormann
fa66623810
chore(version): Depend on hyper-native-tls 0.3 to use openssl 1.1
2019-01-27 16:27:09 +01:00
Jamie Turner
ab4b2c2fd4
Rust 2018 edition modifications.
2019-01-04 12:43:19 -08:00
Igor Gnatenko
9b5bbf5459
deps: hyper-rustls → hyper-native-tls
...
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com >
2018-07-25 22:51:37 +02:00
Lewin Bormann
b6732329a0
chore(api): Update use of pubsub client API.
2018-03-24 20:42:04 +01:00
Lewin Bormann
8e7060b041
fix(deps): Fix hyper_rustls dependency for service_account example.
2017-06-22 21:11:32 +02:00
Lewin Bormann
da1128fa30
fix(deps): Fix hyper_rustls dependency in drive_example.
2017-06-22 20:59:13 +02:00
Lewin Bormann
7da7f39085
chore(deps): Move pubsub example to hyper 0.10.
2017-02-04 17:03:48 +01:00
Lewin Bormann
732d65aa98
chore(deps): Update drive example to hyper 0.10 + rustls.
2017-02-04 17:03:44 +01:00
Lewin Bormann
59193d4e2d
chore(deps): Upgraded examples to hyper=0.10
...
This should get rid of openssl-sys 0.7 once and for all (#51 ).
2017-02-02 19:27:43 +01:00
Lewin Bormann
6a74ec6962
test(examples): Build examples during CI.
2017-01-30 19:07:46 +01:00
Lewin Bormann
01b933a1c6
chore(version): Bump version to 1.0.0
2016-10-09 09:56:23 +02:00
Lewin Bormann
08d79de313
fix(tests): A deactivated key leads to "Signature errors"
2016-10-01 15:40:45 +02:00
Lewin Bormann
80b21bdddb
fix(example): Use crates.io version of google-pubsub1 for examples
...
This was a local change that leaked into a commit.
2016-09-28 22:10:49 +02:00
Lewin Bormann
8d9c42c449
Merge pull request #34 from dermesser/service-account-example
...
Add service account example
2016-09-25 20:23:08 +02:00
Lewin Bormann
bb6ce78b38
fix(review comments): Implement @Byron's suggestions on #34
2016-09-25 20:20:23 +02:00
Sebastian Thiel
0c1a7e7c14
Merge pull request #30 from dermesser/drive-example
...
feat(example): Implement a simple installed-flow example
2016-09-25 18:15:05 +02:00
Lewin Bormann
1ceaf6044e
fix(deps): Remove unnecessary dependencies in drive_example
2016-09-22 10:37:03 +02:00
Lewin Bormann
e1eeeefeff
feat(examples): Add example for installed-interactive flow.
...
This PR also depends on the version bump to 0.6.4.
2016-09-21 22:44:13 +02:00
Lewin Bormann
4ba43532aa
feat(examples): Add example for service accounts + Cloud Pubsub
...
Please note that I specified version 0.9.4 in the example crate
(anticipating the version bump)
2016-09-21 22:10:19 +02:00
Lewin Bormann
1c1880cfe7
feat(service_account): Implement token source for service accounts
...
Tested with unit tests and against Google OAuth.
2016-09-20 20:29:19 +02:00
Sebastian Thiel
c18ae07bbb
imp(duration): use std::time::Duration everywhere
...
This gets rid of the time crate, which was necessary only while Duration wasn't stable
in std.
2016-02-07 10:09:36 +01:00
Sebastian Thiel
ad0bde3092
fix(tests): assure tests actually work
...
Previously we simply forgot to run the tests, and published test-code
that didn't really work.
2015-08-08 11:45:53 +02:00
Sebastian Thiel
a260b13868
fix(lib): setup nightly crate meta data correctly
...
* 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
2015-06-11 11:29:10 +02:00
Sebastian Thiel
3ca51ccfe2
fix(rustup): 1.1.0-nightly (97d4e76c2 2015-04-27)
...
Also incremented version
2015-04-29 09:53:27 +02:00
Sebastian Thiel
727c1d801b
fix(rustup): replace sleep with sleep_ms
...
Now it works with the latest compiler. I wonder why I didn't notice
that before ... .
2015-04-26 21:13:45 +02:00
Sebastian Thiel
2481c75c31
fix(API): review Result types and adapt code
...
* Do not return massive custom result enums, but instead adhere to the
`Result` convention. This natively fixed our problem related to having
to make unnecessary clones, making our design much cleaner.
Fixes #4
2015-04-23 17:01:21 +02:00
Sebastian Thiel
2cdf8bbf76
fix(API): overall improved error handling
...
* Return `Result<Token, Box<Error>>` type wherever feasible
* increment version to 0.3.5
* remove all usages of depreceated std items
2015-04-23 13:47:49 +02:00
Sebastian Thiel
0222a19e9d
fix(version-up): v0.3.3
...
* hyper adjustments to deal with Client without type parameter
* adjust to changed crate name conventions, '-' are converted to '_'
Fixes #3
2015-04-08 16:40:48 +02:00
Sebastian Thiel
3d1678daea
fix(rustup): update to latest rustc
...
rustc 1.0.0-nightly (3e4be02b8 2015-03-13) (built 2015-03-13)
2015-03-15 11:34:03 +01:00
Sebastian Thiel
fb0c3ff506
feat(auth): Authenticator support GetToken trait
...
This will allow its usage in generics, without having to provide
the 4 additional template types it usees.
2015-03-01 09:56:58 +01:00
Sebastian Thiel
dea3e6b3fd
test(auth): removed DeviceFlowHelper
...
It's superseded by the more powerful `Authenticator`.
Adjusted library documentation accordingly, as well as `auth` program.
2015-02-28 12:03:30 +01:00
Sebastian Thiel
515e128cac
feat(auth): open verification url automatically
2015-02-27 17:53:01 +01:00
Sebastian Thiel
1f655b4eff
feat(common): Token type serialization support
...
This works by storing only timestamps.
Some convenience is provided as well.
2015-02-27 16:34:17 +01:00