From 08df147f5cf3e23f32fe80f8daa809312baeeac0 Mon Sep 17 00:00:00 2001 From: Matthew Scheirer Date: Sat, 23 Sep 2017 22:37:04 -0400 Subject: [PATCH] Add redirect url getter to client --- src/lib.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index fed0b7f..4f01fb4 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -102,7 +102,7 @@ type IdToken = Compact; /// OpenID Connect Client for a provider specified at construction. pub struct Client { - pub oauth: inth_oauth2::Client, + oauth: inth_oauth2::Client, jwks: JWKSet, } @@ -142,6 +142,11 @@ impl Client { } } + /// Passthrough to the redirect_url stored in inth_oauth2 as a str. + pub fn redirect_url(&self) -> &str { + self.oauth.redirect_uri.as_ref().unwrap() + } + /// Passthrough to the inth_oauth2::client's request token. pub fn request_token(&self, client: &reqwest::Client,