valid_scope_name

function valid_scope_name(scope: text): text(source)

Ensures that the scope is valid, also trimming leading and trailing whitespace.

Throws if scope is not valid

Return

the valid scope name, trimmed from leading and trailing whitespace

Parameters

scope

The scope parameter of the auth handler to trim and check

See also

require_valid_scope_name

for the rules on scope validation