Skip to main content

claims_have_admin_scope

Function claims_have_admin_scope 

Source
pub fn claims_have_admin_scope(claims: &DkodClaims) -> bool
Expand description

Returns true when claims.scope equals "admin" or contains the word "admin" (space-separated scopes).

Callers must pass claims that have already been fully verified (signature + expiry) by AuthConfig::validate. Never call this with claims obtained via an insecure decode path.