MCPcopy
hub / github.com/authlib/authlib / list_to_scope

Function list_to_scope

authlib/oauth2/rfc6749/util.py:8–14  ·  view source on GitHub ↗

Convert a list of scopes to a space separated string.

(scope)

Source from the content-addressed store, hash-verified

6
7
8def list_to_scope(scope):
9 """Convert a list of scopes to a space separated string."""
10 if isinstance(scope, (set, tuple, list)):
11 return " ".join([to_unicode(s) for s in scope])
12 if scope is None:
13 return scope
14 return to_unicode(scope)
15
16
17def scope_to_list(scope):

Callers 4

get_allowed_scopeMethod · 0.90
get_allowed_scopeMethod · 0.90
prepare_grant_uriFunction · 0.85
prepare_token_requestFunction · 0.85

Calls 1

to_unicodeFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…