Skip to content

Commit 1fee5a7

Browse files
committed
oidc visibility mod
1 parent 651f067 commit 1fee5a7

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/handlers/http/oidc.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ fn redirect_to_oidc_logout(mut logout_endpoint: Url, redirect: &Url) -> HttpResp
258258
.finish()
259259
}
260260

261-
fn redirect_to_client(
261+
pub fn redirect_to_client(
262262
url: &str,
263263
cookies: impl IntoIterator<Item = Cookie<'static>>,
264264
) -> HttpResponse {
@@ -279,7 +279,7 @@ fn redirect_no_oauth_setup(mut url: Url) -> HttpResponse {
279279
response.finish()
280280
}
281281

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

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

300-
async fn request_token(
300+
pub async fn request_token(
301301
oidc_client: Arc<DiscoveredClient>,
302302
login_query: &Login,
303303
) -> anyhow::Result<(Claims, Userinfo)> {
@@ -316,7 +316,7 @@ async fn request_token(
316316

317317
// put new user in metadata if does not exits
318318
// update local cache
319-
async fn put_user(
319+
pub async fn put_user(
320320
username: &str,
321321
group: HashSet<String>,
322322
user_info: user::UserInfo,
@@ -339,7 +339,7 @@ async fn put_user(
339339
Ok(user)
340340
}
341341

342-
async fn update_user_if_changed(
342+
pub async fn update_user_if_changed(
343343
mut user: User,
344344
group: HashSet<String>,
345345
user_info: user::UserInfo,

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ mod livetail;
3434
mod metadata;
3535
pub mod metrics;
3636
pub mod migration;
37-
mod oidc;
37+
pub mod oidc;
3838
pub mod option;
3939
pub mod otel;
4040
pub mod parseable;

0 commit comments

Comments
 (0)