mirror of
https://github.com/ViViDboarder/bitwarden_rs_ldap.git
synced 2024-10-31 16:56:26 +00:00
WIP: Make admin token optional
This commit is contained in:
parent
829ed5585c
commit
2bcc971e83
@ -30,14 +30,14 @@ impl User {
|
||||
|
||||
pub struct Client {
|
||||
url: String,
|
||||
admin_token: String,
|
||||
admin_token: Option<String>,
|
||||
cookie: Option<String>,
|
||||
cookie_created: Option<Instant>,
|
||||
}
|
||||
|
||||
impl Client {
|
||||
/// Create new instance of client
|
||||
pub fn new(url: String, admin_token: String) -> Client {
|
||||
pub fn new(url: String, admin_token: Option<String>) -> Client {
|
||||
Client {
|
||||
url,
|
||||
admin_token,
|
||||
|
@ -37,7 +37,7 @@ pub fn read_config() -> Config {
|
||||
pub struct Config {
|
||||
// Bitwarden connection config
|
||||
bitwarden_url: String,
|
||||
bitwarden_admin_token: String,
|
||||
bitwarden_admin_token: Option<String>,
|
||||
// LDAP Connection config
|
||||
ldap_host: String,
|
||||
ldap_scheme: Option<String>,
|
||||
@ -67,7 +67,7 @@ impl Config {
|
||||
self.bitwarden_url.clone()
|
||||
}
|
||||
|
||||
pub fn get_bitwarden_admin_token(&self) -> String {
|
||||
pub fn get_bitwarden_admin_token(&self) -> Option<String> {
|
||||
self.bitwarden_admin_token.clone()
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user