MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / record_auth_success

Method record_auth_success

nodedb/src/control/security/observability.rs:105–116  ·  view source on GitHub ↗

Record auth success by method.

(&self, method: &str)

Source from the content-addressed store, hash-verified

103
104 /// Record auth success by method.
105 pub fn record_auth_success(&self, method: &str) {
106 match method {
107 "password" | "scram" => self.auth_success_password.fetch_add(1, Ordering::Relaxed),
108 "api_key" => self.auth_success_api_key.fetch_add(1, Ordering::Relaxed),
109 "jwt" => self.auth_success_jwt.fetch_add(1, Ordering::Relaxed),
110 "certificate" => self
111 .auth_success_certificate
112 .fetch_add(1, Ordering::Relaxed),
113 "trust" => self.auth_success_trust.fetch_add(1, Ordering::Relaxed),
114 _ => 0,
115 };
116 }
117
118 /// Record auth failure by reason.
119 pub fn record_auth_failure(&self, reason: &str) {

Callers 7

counter_incrementsFunction · 0.45
prometheus_exportFunction · 0.45
handle_authFunction · 0.45
authenticateFunction · 0.45
verify_api_key_identityFunction · 0.45
handle_authFunction · 0.45

Calls

no outgoing calls

Tested by 2

counter_incrementsFunction · 0.36
prometheus_exportFunction · 0.36