Skip to content

oidc visibility mod #1377

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/handlers/http/oidc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ fn redirect_to_oidc_logout(mut logout_endpoint: Url, redirect: &Url) -> HttpResp
.finish()
}

fn redirect_to_client(
pub fn redirect_to_client(
url: &str,
cookies: impl IntoIterator<Item = Cookie<'static>>,
) -> HttpResponse {
Expand All @@ -279,7 +279,7 @@ fn redirect_no_oauth_setup(mut url: Url) -> HttpResponse {
response.finish()
}

fn cookie_session(id: Ulid) -> Cookie<'static> {
pub fn cookie_session(id: Ulid) -> Cookie<'static> {
let authorization_cookie = Cookie::build(SESSION_COOKIE_NAME, id.to_string())
.max_age(time::Duration::days(COOKIE_AGE_DAYS as i64))
.same_site(SameSite::Strict)
Expand All @@ -288,7 +288,7 @@ fn cookie_session(id: Ulid) -> Cookie<'static> {
authorization_cookie
}

fn cookie_username(username: &str) -> Cookie<'static> {
pub fn cookie_username(username: &str) -> Cookie<'static> {
let authorization_cookie = Cookie::build(USER_COOKIE_NAME, username.to_string())
.max_age(time::Duration::days(COOKIE_AGE_DAYS as i64))
.same_site(SameSite::Strict)
Expand All @@ -297,7 +297,7 @@ fn cookie_username(username: &str) -> Cookie<'static> {
authorization_cookie
}

async fn request_token(
pub async fn request_token(
oidc_client: Arc<DiscoveredClient>,
login_query: &Login,
) -> anyhow::Result<(Claims, Userinfo)> {
Expand All @@ -316,7 +316,7 @@ async fn request_token(

// put new user in metadata if does not exits
// update local cache
async fn put_user(
pub async fn put_user(
username: &str,
group: HashSet<String>,
user_info: user::UserInfo,
Expand All @@ -339,7 +339,7 @@ async fn put_user(
Ok(user)
}

async fn update_user_if_changed(
pub async fn update_user_if_changed(
mut user: User,
group: HashSet<String>,
user_info: user::UserInfo,
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ mod livetail;
mod metadata;
pub mod metrics;
pub mod migration;
mod oidc;
pub mod oidc;
pub mod option;
pub mod otel;
pub mod parseable;
Expand Down
Loading