Add redirect url getter to client
This commit is contained in:
parent
f4cf2fcea3
commit
08df147f5c
|
@ -102,7 +102,7 @@ type IdToken = Compact<Claims, Empty>;
|
|||
|
||||
/// OpenID Connect Client for a provider specified at construction.
|
||||
pub struct Client {
|
||||
pub oauth: inth_oauth2::Client<Discovered>,
|
||||
oauth: inth_oauth2::Client<Discovered>,
|
||||
jwks: JWKSet<Empty>,
|
||||
}
|
||||
|
||||
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue