def requires_app_credentials(func):
    @wraps(func)
    def auth_wrapper(self, *args, **kwargs):
        client_id, client_secret = self.session.retrieve_client_credentials()
        if client_id and client_secret:
            return func(self, *args, **kwargs)
        else:
            from .exceptions import error_for
            # Mock a 401 response
            r = generate_fake_error_response(
                '{"message": "Requires username/password authentication"}'
            )
            raise error_for(r)

    return auth_wrapper
Require client_id and client_secret to be associated.
dataset/ETHPy150Open sigmavirus24/github3.py/github3/decorators.py/requires_app_credentials