Commit Graph

27 Commits

Author SHA1 Message Date
Dirkjan Ochtman
c51c7e636f Update dependencies 2022-11-25 07:56:08 -08:00
Brandon Ogle
db8dd7d68d Fix tests and examples to use token() method on AccessToken 2022-10-10 12:46:45 -07:00
Brandon Ogle
2d805cf19e Merge branch 'nagisa/id_token' of github.com:nagisa/yup-oauth2 into nagisa-nagisa/id_token 2022-09-21 18:51:59 -07:00
chritoep
110c65ab07 added access token authenticator 2022-08-26 08:50:28 +02:00
Lewin Bormann
fb658f6d10 Merge pull request #173 from djc/rustls-0.20
Upgrade rustls and related dependencies
2022-04-18 18:44:18 -07:00
Lewin Bormann
378dca1148 rustls upgrade: supply correct client in test cases 2022-04-18 18:39:57 -07:00
Dirkjan Ochtman
32b6d8fa63 Allow testing without https 2022-04-11 11:38:25 +02:00
Lewin Bormann
986bda2465 Merge branch 'pr165'
for #165
2022-04-08 23:27:45 -07:00
Lewin Bormann
23c8053d4a for #165: update refresh flow test 2022-04-08 23:27:22 -07:00
Sarah Bird
2128772d88 Replace chrono with time 2022-03-11 19:39:11 -06:00
Lukas Winkler
39c712dfab Remove no longer applicatble TODO's 2021-12-01 13:50:16 +01:00
Lukas Winkler
169e5ff1c0 Allow overriding metadata url used during testing 2021-11-25 19:37:11 +01:00
Antti Peltonen
921f1c7190 builder pattern for adc struct 2021-11-21 09:57:07 +01:00
Antti Peltonen
7638946508 work started on adc implementation 2021-11-21 09:57:06 +01:00
Simonas Kazlauskas
4e54fbaeaf Implement support for ID tokens
For google stuff these are relevant when trying to invoke e.g. Cloud
Run services. I'm not at all knowledgeable enough with OAuth to be able
to tell if what I'm doing here is correct.

This is a breaking change. `AccessToken` got renamed to just `Token`
(since it now encompasses more than just `access_token` and there are
some changes to the `TokenInfo` type too.

Sponsored by: standard.ai
2021-07-19 16:23:37 +03:00
Simonas Kazlauskas
d385601433 --all-features and --no-default-features
This adjusts the code and documentation for `--all-features` and
`--no-default-features` to work correctly. With `--no-default-features`
no `DefaultAuthenticator` is made available. Users are in control of
picking the `Connector` they want to use, and are not forced to stomach
a dependency on `rustls` or `hyper-tls` if their TLS implementation of
choice doesn't happen to match one of the two.

To indicate this, the unstable `doc_cfg` feature is used to build
documentation on docs.rs. That way the generated documentation has
notices on these types that look as such:

> This is supported on crate features hyper-rustls or hyper-tls only.

Additionally this functionality is tested via additional coverage in the
Actions' CI.
2021-06-29 12:57:57 +03:00
Lewin Bormann
010668cc62 Make Authenticator Clone 2021-03-04 19:32:20 +01:00
Lyon Beckers
26db4b6efc introduced a feature which allows the use of hyper-tls instead of hyper-rustls 2021-01-29 16:58:06 -07:00
Maxime Bedard
cc2abadb3c fmt 2020-12-26 22:14:57 -05:00
Maxime Bedard
07bc4803c0 update hyper-rustls to 0.22 2020-12-26 19:30:43 -05:00
Maxime Bedard
4026d92cf6 Bump to tokio 0.3 and hyper 0.14 2020-11-12 20:31:19 -05:00
Glenn Griffin
f00bc5cb35 Update to httptest v0.11.1 2020-02-05 12:13:00 -08:00
Glenn Griffin
1d5c3a4512 Switch from mockito to httptest 2019-12-18 09:07:45 -08:00
Glenn Griffin
9238153723 Move to hyper 0.13.1!!!! 2019-12-18 09:07:45 -08:00
Glenn Griffin
6817fce0bc Extend the refresh tests.
Verify that a second refresh can happen after the first. This adds
coverage to ensure that a refresh flow keeps the refresh token intact by
showing that a second refresh can succeed.
2019-12-18 09:07:45 -08:00
Glenn Griffin
36d186deb4 Authenticator now returns an AccessToken.
What was previously called Token is now TokenInfo and is merely an
internal implementation detail. The publicly visible type is now called
AccessToken and differs from TokenInfo by not including the refresh
token. This makes it a smaller type for users to pass around as well as
reducing the ways that a refresh token may be leaked. Since the
Authenticator is responsible for refreshing the tokens there isn't any
reason users should need to concern themselves with refresh tokens.
2019-12-18 09:07:45 -08:00
Glenn Griffin
045c3e7735 Move all the end to end tests into an integration test
All the same functionality can be tested through the publicly exposed
API providing more extensive coverage.
2019-12-18 09:07:45 -08:00