pub fn authorize_with_matcher<M: ScopeMatcher>(
user_scope_str: &str,
required_token: &str,
) -> boolExpand description
Checks if a required scope is authorized by any of the user’s scopes
using the given ScopeMatcher implementation.
§Arguments
user_scope_str: space-delimited string of scopes from the user (e.g. from claims or roles)required_token: the scope token required for the action (e.g."read:users")
§Returns
trueif at least one user scope matches the required scope using the matcher.
§Example
let authorized = authorize_with_matcher::<FlexibleMatcher>("read:users write:posts", "read:users");
assert!(authorized);