use serde_json::Value;
pub mod claim_types {
pub const AUTHENTICATION_METHOD: &str =
"http://schemas.microsoft.com/ws/2008/06/identity/claims/authenticationmethod";
pub const ROLE: &str = "http://schemas.microsoft.com/ws/2008/06/identity/claims/role";
pub const GROUP: &str = "http://schemas.xmlsoap.org/claims/group";
pub const PRIMARY_SID: &str =
"http://schemas.microsoft.com/ws/2008/06/identity/claims/primarysid";
pub const UPN: &str = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn";
}
#[derive(Debug, Serialize, Deserialize, Clone)]
pub struct Claim {
pub claim_type: String,
pub value: Value,
}
impl Claim {
pub fn new(claim_type: &str, value: Value) -> Claim {
let claim_type_str = String::from(claim_type);
Claim {
claim_type: claim_type_str,
value: value,
}
}
}