-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a1a61fe
commit 96f7110
Showing
8 changed files
with
62 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
use axum_extra::extract::CookieJar; | ||
use reqwest::StatusCode; | ||
|
||
use crate::oauth::{IntrospectionTokenResponse, OAuthHttpHandler}; | ||
|
||
pub async fn oauth2_introspect( | ||
handler: OAuthHttpHandler, | ||
jar: CookieJar, | ||
) -> (CookieJar, StatusCode, Option<IntrospectionTokenResponse>) { | ||
let (updated_jar, response) = handler.introspect(jar).await; | ||
|
||
(updated_jar, response.to_owned().map_or_else(|| StatusCode::UNAUTHORIZED, |_| StatusCode::OK), response) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
pub use authorize::{oauth2_authorize, AuthorizationQuery}; | ||
pub use callback::{oauth2_callback, AuthorizationCallbackQuery}; | ||
pub use get_session::get_session_from_cookie; | ||
pub use introspect::oauth2_introspect; | ||
pub use proxy::proxy; | ||
|
||
mod authorize; | ||
mod callback; | ||
mod get_session; | ||
mod introspect; | ||
mod proxy; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters