Skip to content
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
6 changes: 3 additions & 3 deletions src/console/src/auth/authenticate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ use crate::types::interface::{Authentication, AuthenticationError, Authenticatio
use junobuild_auth::delegation::types::{
GetDelegationResult, OpenIdGetDelegationArgs, OpenIdPrepareDelegationArgs,
};
use junobuild_auth::state::get_providers;
use junobuild_auth::state::get_auth_providers;

pub async fn openid_authenticate(
args: &OpenIdPrepareDelegationArgs,
) -> Result<AuthenticationResult, String> {
let providers = get_providers(&AuthHeap)?;
let providers = get_auth_providers(&AuthHeap)?;

// Guard too many requests
increment_mission_controls_rate()?;
Expand Down Expand Up @@ -39,7 +39,7 @@ pub async fn openid_authenticate(
pub fn openid_get_delegation(
args: &OpenIdGetDelegationArgs,
) -> Result<GetDelegationResult, String> {
let providers = get_providers(&AuthHeap)?;
let providers = get_auth_providers(&AuthHeap)?;

let result = delegation::openid_get_delegation(args, &providers);

Expand Down
4 changes: 3 additions & 1 deletion src/libs/auth/src/state/store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ pub async fn init_salt(auth_heap: &impl AuthHeapStrategy) -> Result<(), String>
Ok(())
}

pub fn get_providers(auth_heap: &impl AuthHeapStrategy) -> Result<OpenIdAuthProviders, String> {
pub fn get_auth_providers(
auth_heap: &impl AuthHeapStrategy,
) -> Result<OpenIdAuthProviders, String> {
let config = get_config(auth_heap).ok_or(JUNO_AUTH_ERROR_NOT_CONFIGURED.to_string())?;
let openid = config
.openid
Expand Down
6 changes: 3 additions & 3 deletions src/libs/satellite/src/auth/authenticate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ use crate::types::interface::{Authentication, AuthenticationError, Authenticatio
use junobuild_auth::delegation::types::{
GetDelegationResult, OpenIdGetDelegationArgs, OpenIdPrepareDelegationArgs,
};
use junobuild_auth::state::get_providers;
use junobuild_auth::state::get_auth_providers;

pub async fn openid_authenticate(
args: &OpenIdPrepareDelegationArgs,
) -> Result<AuthenticationResult, String> {
let providers = get_providers(&AuthHeap)?;
let providers = get_auth_providers(&AuthHeap)?;

// We assert early on to avoid generating a delegation which won't be used
// in case the user cannot be created. We also want to prevent creating delegations
Expand All @@ -37,7 +37,7 @@ pub async fn openid_authenticate(
pub fn openid_get_delegation(
args: &OpenIdGetDelegationArgs,
) -> Result<GetDelegationResult, String> {
let providers = get_providers(&AuthHeap)?;
let providers = get_auth_providers(&AuthHeap)?;

let result = delegation::openid_get_delegation(args, &providers);

Expand Down
Loading