Skip to main content

split_and_validate_scopes

Function split_and_validate_scopes 

Source
pub fn split_and_validate_scopes(
    requested: &str,
    allowed: &[String],
) -> Result<Vec<String>, String>
Expand description

Splits a space-delimited scope string and checks every element against allowed.

Returns the parsed scopes, or the first requested scope not present in allowed. Callers decide how to map an absent/empty request and how to report a rejection.