1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// Copyright (c) 2018-2023, agnos.ai UK Ltd, all rights reserved.
//---------------------------------------------------------------

const RDFOX_DEFAULT_ROLE_USERID: &str = "admin";
const RDFOX_DEFAULT_ROLE_PASSWD: &str = "admin";

#[derive(Debug, Clone, PartialEq, Eq)]
pub struct RoleCreds {
    pub(crate) role_name: String,
    pub(crate) password:  String,
}

impl Default for RoleCreds {
    fn default() -> Self {
        Self {
            role_name: RDFOX_DEFAULT_ROLE_USERID.to_string(),
            password:  RDFOX_DEFAULT_ROLE_PASSWD.to_string(),
        }
    }
}

impl RoleCreds {
    #[allow(dead_code)]
    pub fn new(role_name: &str, password: &str) -> Self {
        Self {
            role_name: role_name.to_string(),
            password:  password.to_string(),
        }
    }
}