use super::ZapApiError;
use super::ZapService;
use serde_json::Value;
use std::collections::HashMap;
pub fn get_supported_authentication_methods(service: &ZapService) -> Result<Value, ZapApiError> {
let params = HashMap::new();
super::call(
service,
"authentication",
"view",
"getSupportedAuthenticationMethods",
params,
)
}
pub fn get_authentication_method_config_params(
service: &ZapService,
authmethodname: String,
) -> Result<Value, ZapApiError> {
let mut params = HashMap::new();
params.insert("authMethodName".to_string(), authmethodname);
super::call(
service,
"authentication",
"view",
"getAuthenticationMethodConfigParams",
params,
)
}
pub fn get_authentication_method(
service: &ZapService,
contextid: String,
) -> Result<Value, ZapApiError> {
let mut params = HashMap::new();
params.insert("contextId".to_string(), contextid);
super::call(
service,
"authentication",
"view",
"getAuthenticationMethod",
params,
)
}
pub fn get_logged_in_indicator(
service: &ZapService,
contextid: String,
) -> Result<Value, ZapApiError> {
let mut params = HashMap::new();
params.insert("contextId".to_string(), contextid);
super::call(
service,
"authentication",
"view",
"getLoggedInIndicator",
params,
)
}
pub fn get_logged_out_indicator(
service: &ZapService,
contextid: String,
) -> Result<Value, ZapApiError> {
let mut params = HashMap::new();
params.insert("contextId".to_string(), contextid);
super::call(
service,
"authentication",
"view",
"getLoggedOutIndicator",
params,
)
}
pub fn set_authentication_method(
service: &ZapService,
contextid: String,
authmethodname: String,
authmethodconfigparams: String,
) -> Result<Value, ZapApiError> {
let mut params = HashMap::new();
params.insert("contextId".to_string(), contextid);
params.insert("authMethodName".to_string(), authmethodname);
params.insert("authMethodConfigParams".to_string(), authmethodconfigparams);
super::call(
service,
"authentication",
"action",
"setAuthenticationMethod",
params,
)
}
pub fn set_logged_in_indicator(
service: &ZapService,
contextid: String,
loggedinindicatorregex: String,
) -> Result<Value, ZapApiError> {
let mut params = HashMap::new();
params.insert("contextId".to_string(), contextid);
params.insert("loggedInIndicatorRegex".to_string(), loggedinindicatorregex);
super::call(
service,
"authentication",
"action",
"setLoggedInIndicator",
params,
)
}
pub fn set_logged_out_indicator(
service: &ZapService,
contextid: String,
loggedoutindicatorregex: String,
) -> Result<Value, ZapApiError> {
let mut params = HashMap::new();
params.insert("contextId".to_string(), contextid);
params.insert(
"loggedOutIndicatorRegex".to_string(),
loggedoutindicatorregex,
);
super::call(
service,
"authentication",
"action",
"setLoggedOutIndicator",
params,
)
}