Skip to content

Commit

Permalink
Fix Endpoint impl for ErrorInto with extension
Browse files Browse the repository at this point in the history
As discussed in HeroicKatora#38, this fixes the incorrect implementation of Endpoint
for ErrorInto, missing a forward to the wrapped Endpoint, currently returning the
default implementation None.
  • Loading branch information
thespooler committed Jan 28, 2020
1 parent c7dad3d commit 0f8bc80
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion oxide-auth/src/frontends/simple/endpoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use primitives::registrar::Registrar;
use primitives::scope::Scope;

use endpoint::{AccessTokenFlow, AuthorizationFlow, ResourceFlow, RefreshFlow};
use endpoint::{Endpoint, OAuthError, PreGrant, Template, Scopes};
use endpoint::{Endpoint, Extension, OAuthError, PreGrant, Template, Scopes};
use endpoint::{OwnerConsent, OwnerSolicitor};
use endpoint::WebRequest;

Expand Down Expand Up @@ -510,6 +510,10 @@ where
fn web_error(&mut self, err: W::Error) -> Self::Error {
self.0.web_error(err).into()
}

fn extension(&mut self) -> Option<&mut dyn Extension> {
self.0.extension()
}
}

impl<W, R, A, I, O, C, L> Endpoint<W> for Generic<R, A, I, O, C, L>
Expand Down

0 comments on commit 0f8bc80

Please sign in to comment.