Commit Graph

19 Commits

Author SHA1 Message Date
Mark Catley
ff8b3ede30 Updates to allow retrieving a token using the device flow on Salesforce. 2019-06-28 09:49:52 +12:00
Lewin Bormann
602ea1565d refactor(errors): Move almost everything to RequestError.
This is nicer than stupid Box<dyn Error+Send> everywhere.
2019-06-22 21:53:55 +02:00
Lewin Bormann
9e4a7e6d49 refactor(StringError): Take more comfortable types in StringError::new 2019-06-14 10:44:44 +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
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
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
c2fbee4dc8 rewrite(installed): Make the InstalledFlow asynchronous with futures. 2019-06-11 23:29:12 +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
Jamie Turner
ab4b2c2fd4 Rust 2018 edition modifications. 2019-01-04 12:43:19 -08:00
Igor Gnatenko
e634d3f139 deps: update chrono to 0.4
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2018-07-25 22:47:52 +02:00
Lewin Bormann
a8479b8ddb feat(device): Make the Device flow independent of Google
This is a breaking change; it's supposed to fix #1. Also, it's a
proposal -- not sure if the benefits outweigh the cost of this.

The example/auth.rs binary is not broken by this, as it doesn't use the
API that changed. The tests have been updated accordingly.
2016-10-09 09:55:33 +02:00
Lewin Bormann
ed0a3c4990 fix(types::Token): Don't panic if refresh_token is empty
Service account tokens don't set the refresh_token. Checking the
access_token field should be sufficient.
2016-09-21 09:24:09 +02:00
Lewin Bormann
2bdb47375a feat(refactor): Move StringError from authenticator to types module 2016-09-20 20:18:45 +02:00
Lewin Bormann
85b12dd3e8 refactor(common): Rename common -> types 2016-08-31 20:01:24 +02:00