Commit Graph

314 Commits

Author SHA1 Message Date
Lewin Bormann
5e76c2258f docs(README): Update README about provider specificity. 2019-06-19 18:24:27 +02:00
Lewin Bormann
534d5edc12 refactor(google): Make some things less google-specific. 2019-06-19 18:22:03 +02:00
Lewin Bormann
9e4a7e6d49 refactor(StringError): Take more comfortable types in StringError::new 2019-06-14 10:44:44 +02:00
Lewin Bormann
d3f1f87760 chore(version): Mark 3.0.0 as -alpha for publishing. 2019-06-13 21:46:40 +02:00
Lewin Bormann
5a568f2358 fix(refresh): Write refreshed tokens back to cache.
Tested manually.
2019-06-13 18:58:49 +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
f034b8bea4 imp(ServiceAccountAccess): Print exact error if server returns one.
Prevents #76.
2019-06-13 16:16:51 +02:00
Lewin Bormann
6b05056b05 imp(expiry): Treat tokens with < 1 minute life left as expired.
Fixes #78.
2019-06-13 16:08:23 +02:00
Lewin Bormann
4cfbc6e5fc imp(Device): Honor FlowDelegate's opinion on pending authorization. 2019-06-13 16:07:32 +02:00
Lewin Bormann
bdb0bd92e7 fix(examples): Update examples to use Authenticator. 2019-06-13 15:32:48 +02:00
Lewin Bormann
48cf83e4da feat(Authenticator): Implement new Authenticator. 2019-06-13 15:32:31 +02:00
Lewin Bormann
18411a0610 imp(Storage): Implement Default for MemoryStorage and make errors sendable 2019-06-13 15:30:50 +02:00
Lewin Bormann
a656df6b74 feat(GetToken): Add application_secret method to GetToken trait.
This makes decoupling Authenticator and individual flows easier while
allowing for refreshing tokens.
2019-06-13 15:29:18 +02:00
Lewin Bormann
86e71cca5d feat(DefaultFlowDelegate): Introduce DefaultFlowDelegate type.
This was necessary after splitting traits.
2019-06-13 15:28:25 +02:00
Lewin Bormann
9efad9b086 chore(version): Preemptively change version to 3.0.0 2019-06-13 15:27:41 +02:00
Lewin Bormann
505d759ba0 refactor(Refresh): Convert Refresh flow to be simpler and use futures. 2019-06-12 22:13:58 +02:00
Lewin Bormann
71a45f059e refactor(delegate): Split AuthenticatorDelegate to have FlowDelegate 2019-06-12 21:16:28 +02:00
Lewin Bormann
46e1f1b880 feat(DeviceFlow): Proper timeout handling for the DeviceFlow. 2019-06-12 19:28:37 +02:00
Lewin Bormann
e7a89fae07 refactor(cleanup): Remove obsolete tests.
DeviceFlow now works in a different way, so remove old test.
2019-06-12 18:49:14 +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
39fe5f1d25 chore(syntax): Use dyn everywhere and remove unused imports. 2019-06-12 00:05:32 +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
c2fbee4dc8 rewrite(installed): Make the InstalledFlow asynchronous with futures. 2019-06-11 23:29:12 +02:00
Lewin Bormann
9f061a0a10 Work on Installed flow for futures 2019-06-09 11:25:53 +02:00
Lewin Bormann
79f66402e1 First step towards futures in yup-oauth2 2019-06-09 10:55:53 +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
Lewin Bormann
db4077983f cleanup(openssl): Remove openssl dependency 2019-06-09 08:34:25 +02:00
Lewin Bormann
62facaf799 Merge pull request #93 from alu/master
Fix hyper 0.12.x compatibility
2019-05-28 21:08:53 +02:00
alu
b7962a8ba1 Fix hyper 0.12.x compatibility 2019-05-27 16:16:02 +09:00
Lewin Bormann
a7262ea7e3 chore(version): Publish comma fix for nightly rust in 2.0.1 2019-05-26 20:19:24 +02:00
Lewin Bormann
610240eb7c fix(syntax): Fix #92.
It was a missing comma.
2019-05-26 20:12:08 +02:00
Lewin Bormann
126c7cf32f chore(version): 2.0.0-pre -> 2.0.0 2019-05-26 11:12:26 +02:00
Lewin Bormann
793b0ca688 Merge branch 'pull86'
Merge #86
2019-05-26 11:08:55 +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
e0c05210c1 Update version from 1.x to 2.x
Update version number and docs as the move to Hyper v0.12 will cause a
breaking change to consumers of this lib.
2019-05-26 11:04:32 +02:00
Lewin Bormann
fea08cf0a5 Merge pull request #91 from zeapo/service-account-typo-fix
Typo in ServiceAccountKey
2019-05-09 23:17:15 +02:00
Mohamed Zenadi
6098eeb45c fix typo 2019-05-04 20:06:11 +02:00
Lewin Bormann
47181e4926 Merge pull request #90 from IslandUsurper/string-refs
imp: accept any string-like parameter
2019-04-11 21:04:55 +02:00
Lyle Mantooth
6428023f59 Unupdate the examples. 2019-04-03 13:57:23 -04:00
Lyle Mantooth
108162fcf8 imp: accept any string-like parameter
Use the power of the `AsRef` trait to take generic parameters for
several API functions. This makes the API more ergonomic because the
callers may pass in static `str` slices or references to owned `String`s
or even more exotic things like a `Cow`, all based on their particular
situation.

Update the tests and examples to use the most natural types they have
available.

Fixes #77. No existing code should break, as `&String` implements
`AsRef<str>` and `AsRef<Path>`
2019-04-03 09:01:28 -04:00
Lewin Bormann
de57b8fbdf Merge pull request #88 from TheBiggerGuy/readme
Update README with codecov.io badge
2019-03-01 17:11:49 +01:00
Guy Taylor
f1eb193b26 Update README with codecov.io badge 2019-02-28 15:02:09 +00:00
Lewin Bormann
7e26db39ca Merge pull request #87 from TheBiggerGuy/rustfmt
Rust lint and coverage on Travis.
2019-02-28 07:18:39 +01:00
Guy Taylor
b6644892df Only run example tests on a single Travis config 2019-02-21 20:46:00 +00:00
Guy Taylor
b96cfcd66a Format to fustfmt defaults and force lint check in Travis 2019-02-21 20:46:00 +00:00