HeroicKatora / oxide-auth

A OAuth2 server library, for use in combination with actix or other frontends, featuring a set of configurable and pluggable backends.
685 stars 91 forks source link

oxide-auth-axum `OAuthResource` deadtype #185

Closed thor314 closed 7 months ago

thor314 commented 7 months ago

There are no examples for oxide-auth-axum (:shrug:) but it would appear that OAuthResource is a dead type.

It may be constructed, but not used.

Suggested improvement: I am submitting a follow-up PR implementing:

impl OAuthResource {
    /// Fetch the authorization header from the request
    pub fn authorization_header(&self) -> Option<&str> {
        self.auth.as_deref()
    }
}

which will allow OAuthResource to be used to guard resources.