Giter Site home page Giter Site logo

google-authz's People

Contributors

mechiru avatar paulgb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

google-authz's Issues

Regarding Necessity of `tonic` feature and `enforce_https` method

I am currently using version 1.0.0-alpha.5 of the google-authz crate.

It seems that the google-authz crate doesn't consider feature unification. When using Cargo workspaces, situations may arise where some crates utilize the tonic feature while others do not. In such cases, both crates end up with the tonic feature activated due to feature unification.

As a consequence, even crates that don't use the tonic feature are affected, and the enforce_https method becomes unusable. This contradicts the documentation's statement, "A consequence of this is that features should be additive." Essentially, the tonic feature in this context essentially means no_enforce_https.

I would like to inquire about the necessity of the enforce_https method. If possible, could it be considered for removal?

example: https://github.com/bouzuya/rust-examples/tree/0742fc0baa260f85319504e6df321dffb33ad0d7/google-authz2

Token fetching errors are not retried

auth::oauth2::Inner::poll_ready has a loop in which it seems the intent is that token-fetch errors are retried. When a fetch failure below the max_retry limit occurs, the loop state will be updated with a new Fetching value and fetcher future instance with this code:

if $attempts > self.max_retry {
break Poll::Ready(Err(err));
}
info!("an error occurred during token fetching: attempts={}, err={:?}", $attempts, err);
self.state = State::$variant {
future: RefGuard::new(self.fetcher.fetch()),
attempts: $attempts + 1,
$(
$field: $field.clone(),
)*
};
break Poll::Pending;

However, because of the break Poll::Pending statement at the end of the block, the loop this macro is evaluated within is immediately exited. This means the new fetcher future never gets polled again by the macro, and in effect retries of the token-fetch won't happen.

The result is that an application using this library will see an info-level log message that the token-fetch failed ... but their future that ultimately invoked this library won't resolve to an error.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.