microsoft / microsoft/kiota-ruby
AnonymousAuthenticationProvider causes HTTP layer to throw error
Open
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 5
- Forks
- 8
- Avg merge
- 11h 9m
- Merged PRs (30d)
- 24
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with anonymous_authentication_provider.rb and the call at faraday_request_adapter.rb:52, then reproduce the issue with the PostsClient snippet in the report. Check the return from authenticate_request and verify that the anonymous provider no longer causes the HTTP layer to call resume on nil and that the request completes successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- authentication
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100