feat: switch conductor to use bearer auth
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
This commit is contained in:
parent
ce5b28292e
commit
998060777f
3 changed files with 2 additions and 3 deletions
|
@ -4,7 +4,7 @@ allow_registration = true
|
||||||
source_code = "https://git.batsense.net/LibrePages/pages"
|
source_code = "https://git.batsense.net/LibrePages/pages"
|
||||||
support_email = "support@librepages.example.org"
|
support_email = "support@librepages.example.org"
|
||||||
conductors = [
|
conductors = [
|
||||||
{ username = "librepages_api", api_key = "longrandomlygeneratedpassword", url = "http://localhost:5000"}
|
{ api_key = "longrandomlygeneratedpassword", url = "http://localhost:5000"}
|
||||||
]
|
]
|
||||||
|
|
||||||
[server]
|
[server]
|
||||||
|
|
|
@ -45,7 +45,7 @@ impl Conductor {
|
||||||
event_url.set_path("/api/v1/events/new");
|
event_url.set_path("/api/v1/events/new");
|
||||||
self.client
|
self.client
|
||||||
.post(event_url)
|
.post(event_url)
|
||||||
.basic_auth(&c.username, Some(&c.api_key))
|
.bearer_auth(&c.api_key)
|
||||||
.json(e)
|
.json(e)
|
||||||
.send()
|
.send()
|
||||||
.await
|
.await
|
||||||
|
|
|
@ -88,7 +88,6 @@ pub struct Settings {
|
||||||
|
|
||||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
pub struct Conductor {
|
pub struct Conductor {
|
||||||
pub username: String,
|
|
||||||
pub api_key: String,
|
pub api_key: String,
|
||||||
pub url: Url,
|
pub url: Url,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue