Commit Graph

26 Commits

Author SHA1 Message Date
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
85b12dd3e8 refactor(common): Rename common -> types 2016-08-31 20:01:24 +02:00
Lewin Bormann
9e59bf0496 refactor(all): More flows demand for a different structure
I mainly resolved some circular dependencies that had crept in, and
moved code around. I renamed helper.rs because that was not really an
appropriate name anymore, and moved the delegate code into a new module.
2016-08-31 19:48:38 +02: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
a169d9610d chore(serde): update to serde 0.5.0
Serde move all json code into a separate crate, which we are now pulling
in separately.
2015-08-08 10:40:14 +02:00
Sebastian Thiel
6a5915d7d6 fix(lib): remove macro usage to work on stable
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.
2015-06-18 17:58:22 +02:00
Sebastian Thiel
7383f5efb6 fix(hyper): update to hyper v0.4.0
* `hyper::HttpError` is now the more versatile `hyper::Error`
2015-05-08 11:39:45 +02:00
Sebastian Thiel
9cafc3720e refactor(url): simplify form_urlencode call
It's a great simplification and also uses less (if not zero) overhead,
finally.
Requires url v0.2.33
2015-05-05 08:57:13 +02:00
Sebastian Thiel
a395fe892c fix(JsonError): make error field non-optional
* to makes using the structure much easier.
* incremented version

Fixes #6
2015-05-02 09:06:57 +02:00
Sebastian Thiel
b08b239e88 fix(json): assure we understand json errors
We would actually fail to decode an error, and then assume it's a valid
result, unwrapping another failed attempt to decode the json string
returned by the server.

Cause seems to be that the json error structure now conains an
additional field, 'error_uri'.

* we removed a debug printing ... .
* incremented version
2015-05-01 19:39:57 +02:00
Sebastian Thiel
e05e5553e3 feat(serde): use serde instead of rustc_serialize
That way, we can pretty-print the respective application secret
strucures. This is primiarily of interest for the main client of this
library, namely Google APIs RS.

Version incremented.

Fixes #2
2015-04-30 14:18:44 +02:00
Sebastian Thiel
1ce4147d54 fix(refresh): use correct URL for refresh flow
This also allowed us to simplify the API once again.
2015-04-23 17:24:20 +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
84454d1736 fix(rustup): (abf0548b5 2015-04-15) (built 2015-04-15) 2015-04-17 06:39:16 +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
437a60959b fix(rustup): switch to using io where possible
And adapt to hyper in the same moment
2015-03-07 13:35:21 +01:00
Sebastian Thiel
c227c161fd feat(helper): full implementation of Authenticator
It's a generalized DeviceFlowHelper, able to operate on all flows.
It's also more flexible, as it will automatically refresh token as
required. That way, it lends itself to use in libraries which
want minimal hassle.
2015-02-28 09:37:45 +01:00
Sebastian Thiel
091f1c0759 feat(util): new MemoryStorage and NullStorage
Additionally, the Authenticator interface was scetched out.
It will replace the DeviceFlowHelper, and become the universal
do-it-all tool, as it supports storage as well.
2015-02-27 21:02:41 +01:00
Sebastian Thiel
3f965c8fea feat(device): BorrowMut for client 2015-02-27 20:15:28 +01:00
Sebastian Thiel
88d4bf8c28 fix(refresh): BorrowMut for & and owned Client
That way, we are most flexible, at the cost of additional code.
2015-02-27 20:08:53 +01:00
Sebastian Thiel
4486bd595f feat(refresh): &mut Client instead of Client
Breaking: This changes the existing API ... maybe Borrow can be used
to hide the type of client.
2015-02-27 19:58:06 +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
Sebastian Thiel
aa030e8987 fix(common): AuthenticationType implements Str
Instead of an arbitrary `url()` method with the signature of
`to_slice()`
2015-02-27 15:06:50 +01:00
Sebastian Thiel
b23bb2459b fix(example-auth): convert UTC to local time
Requires chrono 0.2.3 to work.
Also removed some warnings
2015-02-27 08:29:41 +01:00
Sebastian Thiel
2feddf4f56 initial commit after moving it out of yup/lib 2015-02-26 19:43:15 +01:00