def has_credentials(self):
credentials = _credentials_from_request(self.request)<EOL>return (credentials and not credentials.invalid and<EOL>credentials.has_scopes(self._get_scopes()))<EOL>
Returns True if there are valid credentials for the current user
        and required scopes.