@@ -258,7 +258,7 @@ fn redirect_to_oidc_logout(mut logout_endpoint: Url, redirect: &Url) -> HttpResp
258
258
. finish ( )
259
259
}
260
260
261
- fn redirect_to_client (
261
+ pub fn redirect_to_client (
262
262
url : & str ,
263
263
cookies : impl IntoIterator < Item = Cookie < ' static > > ,
264
264
) -> HttpResponse {
@@ -279,7 +279,7 @@ fn redirect_no_oauth_setup(mut url: Url) -> HttpResponse {
279
279
response. finish ( )
280
280
}
281
281
282
- fn cookie_session ( id : Ulid ) -> Cookie < ' static > {
282
+ pub fn cookie_session ( id : Ulid ) -> Cookie < ' static > {
283
283
let authorization_cookie = Cookie :: build ( SESSION_COOKIE_NAME , id. to_string ( ) )
284
284
. max_age ( time:: Duration :: days ( COOKIE_AGE_DAYS as i64 ) )
285
285
. same_site ( SameSite :: Strict )
@@ -288,7 +288,7 @@ fn cookie_session(id: Ulid) -> Cookie<'static> {
288
288
authorization_cookie
289
289
}
290
290
291
- fn cookie_username ( username : & str ) -> Cookie < ' static > {
291
+ pub fn cookie_username ( username : & str ) -> Cookie < ' static > {
292
292
let authorization_cookie = Cookie :: build ( USER_COOKIE_NAME , username. to_string ( ) )
293
293
. max_age ( time:: Duration :: days ( COOKIE_AGE_DAYS as i64 ) )
294
294
. same_site ( SameSite :: Strict )
@@ -297,7 +297,7 @@ fn cookie_username(username: &str) -> Cookie<'static> {
297
297
authorization_cookie
298
298
}
299
299
300
- async fn request_token (
300
+ pub async fn request_token (
301
301
oidc_client : Arc < DiscoveredClient > ,
302
302
login_query : & Login ,
303
303
) -> anyhow:: Result < ( Claims , Userinfo ) > {
@@ -316,7 +316,7 @@ async fn request_token(
316
316
317
317
// put new user in metadata if does not exits
318
318
// update local cache
319
- async fn put_user (
319
+ pub async fn put_user (
320
320
username : & str ,
321
321
group : HashSet < String > ,
322
322
user_info : user:: UserInfo ,
@@ -339,7 +339,7 @@ async fn put_user(
339
339
Ok ( user)
340
340
}
341
341
342
- async fn update_user_if_changed (
342
+ pub async fn update_user_if_changed (
343
343
mut user : User ,
344
344
group : HashSet < String > ,
345
345
user_info : user:: UserInfo ,
0 commit comments