Skip to content

Authentik#2

Merged
Threated merged 43 commits intomainfrom
authentik
Feb 4, 2025
Merged

Authentik#2
Threated merged 43 commits intomainfrom
authentik

Conversation

@Martin1088
Copy link
Contributor

Provider and app can be created.
static flow and property is missing

Comment on lines +15 to +33
/// Central secret sync
#[derive(Debug, Parser)]
pub struct Config {
/// Address the server should bind to
#[clap(env, long, default_value = "0.0.0.0:8080")]
pub bind_addr: SocketAddr,

/// Url of the local beam proxy which is required to have sockets enabled
#[clap(env, long, default_value = "http://beam-proxy:8081")]
pub beam_url: Url,

/// Beam api key
#[clap(env, long)]
pub beam_secret: String,

/// The app id of this application
#[clap(long, env, value_parser=|id: &str| Ok::<_, Infallible>(AppId::new_unchecked(id)))]
pub beam_id: AppId,
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move this central/src/config.rs without bind_addr

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved central

@Threated
Copy link
Member

The two new commits look good to me. I need to take a look at the full changes again then I think its ready to merge

Comment on lines +68 to +91
#[cfg(test)]
// nicht möglich mit authentik
async fn get_access_token_via_admin_login() -> reqwest::Result<String> {
CLIENT
.post(&format!(
"{}/application/o/token/",
if cfg!(test) {
"http://localhost:9000"
} else {
"http://authentik:8080"
}
))
.form(&json!({
"client_id": "",
"username": "",
"password": "",
"grant_type": ""
}))
.send()
.await?
.json::<Token>()
.await
.map(|t| t.access_token)
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then delete it

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delete all fn that don’t work in tests

.map(|t| t.access_token)
}

//#[ignore = "Requires setting up a authentik"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep this ignored as well

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test optimized

Martin Jurk and others added 2 commits January 28, 2025 09:40
Co-authored-by: Jan <59206115+Threated@users.noreply.github.com>
assert!(!t.access_token.is_empty());
}

//#[ignore = "Requires setting up a authentik"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test still needs to be ignored again

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test fixed

@Threated Threated merged commit f0bc039 into main Feb 4, 2025
2 checks passed
@Threated Threated deleted the authentik branch February 4, 2025 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants