Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AnonymousAuthenticationProvider causes HTTP layer to throw error #7

Open
jasonjoh opened this issue Mar 28, 2023 · 0 comments
Open

Comments

@jasonjoh
Copy link
Member

auth_provider = MicrosoftKiotaAbstractions::AnonymousAuthenticationProvider.new()
request_adapter = MicrosoftKiotaFaraday::FaradayRequestAdapter.new(auth_provider)
client = Client::PostsClient.new(request_adapter)

all_posts = client.posts_by_id("5").get.resume

This results in the following error:

/home/jasonjoh/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/microsoft_kiota_faraday-0.11.0/lib/microsoft_kiota_faraday/faraday_request_adapter.rb:52:in `block in send_async': undefined method `resume' for nil:NilClass (NoMethodError)

        @authentication_provider.authenticate_request(request_info).resume

As a test, I modified anonymous_authentication_provider.rb, changing the authenticate_request to:

def authenticate_request(request)
  Fiber.new do
  end
end

And that resolved the error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant