This PR's aim was to add service account impersonation as an authentication method, but in order to do this I had to update the version of yup-oauth to 8.1, which required quite a lot of changes.
The main one is that I removed the concept of TokenSource from this repository, for two reasons:
first, yup-oauth changed a bunch of things regarding how tokens work (a big one is that token generation can produce None now), making TokenSource difficult to adapt;
and second, because TokenSource was a bit redundant with yup-oauth's own concept of authenticators.
Since version 6, the library has added many new authenticators, covering (I think) the use cases that TokenSource was covering. Instead of a token source, AuthGrpcService now carries an authenticator and a list of scopes.
Updating yup-oauth also required replacing the C: crate::Connect + Clone + Send + Sync + 'static bounds with the following mouthful:
the reason being that hyper::Connect is actually a private trait that cannot be implemented, and so yup-oauth changed at some point to the bounds above, which are equivalent, albeit annoying.
there are some failing tests because tokio is technically an optional dependency. Optionality isn't useful in this context i don't think, you could move it to the required deps
This PR's aim was to add service account impersonation as an authentication method, but in order to do this I had to update the version of
yup-oauth
to 8.1, which required quite a lot of changes.The main one is that I removed the concept of
TokenSource
from this repository, for two reasons:yup-oauth
changed a bunch of things regarding how tokens work (a big one is that token generation can produceNone
now), makingTokenSource
difficult to adapt;TokenSource
was a bit redundant withyup-oauth
's own concept of authenticators.Since version 6, the library has added many new authenticators, covering (I think) the use cases that
TokenSource
was covering. Instead of a token source,AuthGrpcService
now carries an authenticator and a list of scopes.Updating
yup-oauth
also required replacing theC: crate::Connect + Clone + Send + Sync + 'static
bounds with the following mouthful:the reason being that
hyper::Connect
is actually a private trait that cannot be implemented, and soyup-oauth
changed at some point to the bounds above, which are equivalent, albeit annoying.