pub fn narrow_scope(
requested: &str,
strict: bool,
) -> Result<(String, Option<String>)>Expand description
Restricts a requested OAuth scope to supported tokens per RFC 6749 §3.3.
Recognized tokens retain their request order, with an MSC2967 device ID
returned separately when present. Unknown tokens are dropped unless strict
is set. Multiple device scopes, empty device IDs, and IDs outside the RFC
6749 scope-token character set return an error.