AnonymousAuthenticationProvider causes HTTP layer to throw error
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- ruby
- Domain
- authentication
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.
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.
- Dominant language
- Ruby
- Stars
- 5
- Forks
- 8
- Avg merge
- 19h 44m
- Merged PRs (30d)
- 25
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing 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.
More from microsoft/kiota-ruby
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
microsoft/kiota-ruby#74 ·
Maintainers usually reply within 1 day
-
help wanted ruby type:bug
Difficulty 4/5 3-5 days Newbie friendliness 35/100
microsoft/kiota-ruby#58 ·
Maintainers usually reply within 1 day
-
http - RetryHandler MUST respect retry-after: <date>Possibly taken @voidstackloop claimed this 19 days ago. Openenhancement help wanted type:enhancement
Difficulty 3/5 1-2 days Newbie friendliness 45/100
microsoft/kiota-ruby#126 · 3 comments ·
Maintainers usually reply within 1 day
-
enhancement help wanted type:enhancement
Difficulty 4/5 3-5 days Newbie friendliness 35/100
microsoft/kiota-ruby#127 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 35/100
microsoft/kiota-ruby#46 ·
Maintainers usually reply within 1 day
All issues in microsoft/kiota-ruby
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
rubys/roundhouse#444 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
sclorg/s2i-ruby-container#656 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
yegor256/rubocop-elegant#92 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
ecosyste-ms/awesome#812 ·
Maintainers usually reply within 2 days