src/scitokens/scitokens.py
def _check_scope(self, scope):
        """
        Given a scope, make sure it contains a resource
        for scope types that require resources.

        Returns a tuple of the (authz, path).  If path is
        not in the scope (and is not required to be explicitly inside
        the scope), it will default to '/'.
        """
        info = scope.split(":", 1)
        authz = info[0]
        if authz in self._authz_requiring_path and (len(info) == 1):
            raise InvalidAuthorizationResource("Token contains an authorization requiring a resource"
                                               "(path), but no path is present")
        if len(info) == 2:
            path = info[1]
            if not path.startswith("/"):
                raise InvalidAuthorizationResource("Token contains a relative path in scope")
            norm_path = urltools.normalize_path(path)
        else:
            norm_path = '/'
        return (authz, norm_path)

        Given a scope, make sure it contains a resource
        for scope types that require resources.

        Returns a tuple of the (authz, path).  If path is
        not in the scope (and is not required to be explicitly inside
        the scope), it will default to '/'.
        
Given a scope, make sure it contains a resource
for scope types that require resources.

Returns a tuple of the (authz, path).  If path is
not in the scope (and is not required to be explicitly inside
the scope), it will default to '/'.
Given a scope make sure it contains a resource for scope types that require resources . Returns a tuple of the ( authz path ) . If path is not in the scope ( and is not required to be explicitly inside the scope ) it will default to ' / ' .
def _check_scope(self, scope):
        info = scope.split(":", 1)
        authz = info[0]
        if authz in self._authz_requiring_path and (len(info) == 1):
            raise InvalidAuthorizationResource("Token contains an authorization requiring a resource"
                                               "(path), but no path is present")
        if len(info) == 2:
            path = info[1]
            if not path.startswith("/"):
                raise InvalidAuthorizationResource("Token contains a relative path in scope")
            norm_path = urltools.normalize_path(path)
        else:
            norm_path = '/'
        return (authz, norm_path)
def _check_scope ( self , scope ) : info = scope . split ( ":" , 1 ) authz = info [ 0 ] if authz in self . _authz_requiring_path and ( len ( info ) == 1 ) : raise InvalidAuthorizationResource ( "Token contains an authorization requiring a resource" "(path), but no path is present" ) if len ( info ) == 2 : path = info [ 1 ] if not path . startswith ( "/" ) : raise InvalidAuthorizationResource ( "Token contains a relative path in scope" ) norm_path = urltools . normalize_path ( path ) else : norm_path = '/' return ( authz , norm_path )
Given a scope, make sure it contains a resource
for scope types that require resources.
Given a scope make sure it contains a resource for scope types that require resources .
"""
        Given a scope, make sure it contains a resource
        for scope types that require resources.

        Returns a tuple of the (authz, path).  If path is
        not in the scope (and is not required to be explicitly inside
        the scope), it will default to '/'.
        """
self
scope