Skip to main content

pick_auth_method

Function pick_auth_method 

Source
pub fn pick_auth_method(
    client_methods: &[String],
    server_anon_ok: bool,
) -> Option<&'static str>
Expand description

Server’s policy for picking an auth method given the client’s preferences. Strongest-first ordering — but when the server has no auth backend configured (server_anon_ok = true), anonymous wins over bearer because bearer validation would fail anyway. v2.1 supports bearer + anonymous; future versions prepend scram-sha-256, mtls, oauth-jwt to the priority list.