class Attio::OAuth::ScopeValidator
def validate(scopes)
-
(InvalidScopeError)
- If any scope is invalid
Returns:
-
(Array
- Validated scopes)
Parameters:
-
scopes
(Array
) -- Scopes to validate, String
def validate(scopes) scopes = Array(scopes).map(&:to_s) invalid_scopes = scopes - VALID_SCOPES unless invalid_scopes.empty? raise InvalidScopeError, "Invalid scopes: #{invalid_scopes.join(", ")}" end scopes end