Can create API tokens
This commit is contained in:
@ -1,3 +1,4 @@
|
||||
use crate::api_tokens::TokenID;
|
||||
use crate::constants;
|
||||
use crate::libvirt_lib_structures::XMLUuid;
|
||||
use crate::libvirt_rest_structures::net::NetworkName;
|
||||
@ -272,6 +273,10 @@ impl AppConfig {
|
||||
pub fn api_tokens_path(&self) -> PathBuf {
|
||||
self.storage_path().join(constants::STORAGE_TOKENS_DIR)
|
||||
}
|
||||
|
||||
pub fn api_token_definition_path(&self, id: TokenID) -> PathBuf {
|
||||
self.api_tokens_path().join(format!("{}.json", id.0))
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, serde::Serialize)]
|
||||
|
Reference in New Issue
Block a user