    def get_default_scopes(self, client_id, request, *args, **kwargs):
        """Get the default scopes for the client.
        :param client_id: Unicode client identifier
        :param request: The HTTP Request (oauthlib.common.Request)
        :rtype: List of default scopes
        Method is used by all core grant types:
            - Authorization Code Grant
            - Implicit Grant
            - Resource Owner Password Credentials Grant
            - Client Credentials grant
        """
        orm_client = (
            self.db.query(orm.OAuthClient).filter_by(identifier=client_id).first()
        )
        if orm_client is None:
            raise ValueError(f"No such client: {client_id}")
        scopes = set(orm_client.allowed_scopes)
        if 'inherit' not in scopes:
            # add identify-user scope
            # and access-service scope
            scopes |= identify_scopes() | access_scopes(orm_client)
        return scopes
Get the default scopes for the client.
:param client_id: Unicode client identifier
:param request: The HTTP Request (oauthlib.common.Request)
:rtype: List of default scopes
Method is used by all core grant types:
- Authorization Code Grant
- Implicit Grant
- Resource Owner Password Credentials Grant
- Client Credentials grant
jupyterhub/oauth/provider.py