def METHOD_NAME(self, request):
    func = self._hooks['create_temporary_credential']
    if callable(func):
        token = self.token_generator()
        return func(token, request.client_id, request.redirect_uri)
    raise RuntimeError(
        '"create_temporary_credential" hook is required.'
    )