print secrets at start
This commit is contained in:
parent
e75c62bab5
commit
48731f99eb
2
Cargo.lock
generated
2
Cargo.lock
generated
|
@ -1466,7 +1466,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tesla-auth-callback-watcher"
|
name = "tesla-auth-callback-watcher"
|
||||||
version = "0.2.1"
|
version = "0.2.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"alex-utils",
|
"alex-utils",
|
||||||
"env_logger",
|
"env_logger",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "tesla-auth-callback-watcher"
|
name = "tesla-auth-callback-watcher"
|
||||||
version = "0.2.1"
|
version = "0.2.2"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Maintainer: Alex Janka <alex@alexjanka.com>
|
# Maintainer: Alex Janka <alex@alexjanka.com>
|
||||||
|
|
||||||
pkgname=tesla-auth-callback-watcher
|
pkgname=tesla-auth-callback-watcher
|
||||||
pkgver=0.2.1
|
pkgver=0.2.2
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
pkgdesc="server for tesla auth callbacks"
|
pkgdesc="server for tesla auth callbacks"
|
||||||
arch=('x86_64' 'aarch64')
|
arch=('x86_64' 'aarch64')
|
||||||
|
|
|
@ -26,6 +26,7 @@ fn rocket() -> _ {
|
||||||
rocket::build().mount("/", routes![authenticated, deauthenticated, login])
|
rocket::build().mount("/", routes![authenticated, deauthenticated, login])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
struct Secrets {
|
struct Secrets {
|
||||||
client_id: String,
|
client_id: String,
|
||||||
client_secret: String,
|
client_secret: String,
|
||||||
|
@ -35,12 +36,14 @@ struct Secrets {
|
||||||
|
|
||||||
impl Secrets {
|
impl Secrets {
|
||||||
fn load() -> Option<Self> {
|
fn load() -> Option<Self> {
|
||||||
Some(Self {
|
let secrets = Self {
|
||||||
client_id: std::env::var("CLIENT_ID").ok()?,
|
client_id: std::env::var("CLIENT_ID").ok()?,
|
||||||
client_secret: std::env::var("CLIENT_SECRET").ok()?,
|
client_secret: std::env::var("CLIENT_SECRET").ok()?,
|
||||||
audience: std::env::var("AUDIENCE").ok()?,
|
audience: std::env::var("AUDIENCE").ok()?,
|
||||||
redirect_uri: std::env::var("REDIRECT_URI").ok()?,
|
redirect_uri: std::env::var("REDIRECT_URI").ok()?,
|
||||||
})
|
};
|
||||||
|
log::warn!("got secrets: {secrets:#?}");
|
||||||
|
Some(secrets)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue