-
Notifications
You must be signed in to change notification settings - Fork 96
feat: Allow Anonymous #256
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
Codecov Report
@@ Coverage Diff @@
## master #256 +/- ##
==========================================
- Coverage 85.17% 84.69% -0.48%
==========================================
Files 72 72
Lines 6454 6455 +1
==========================================
- Hits 5497 5467 -30
- Misses 957 988 +31
Continue to review full report at Codecov.
|
c845e93
to
6ffc19c
Compare
6ffc19c
to
9ad80e1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your PR 👍
Please, satisfy default Checklist:
and following requirements:
- Clarify in
CHANGELOG.md
that the default authentication schema isAnonymous
- Add test to default authentication schema. Something like:
into
[Test] public void AnonymousSchema() { var options = new InfluxDBClientOptions.Builder() .Url("http://localhost:9999") .Build(); Assert.AreEqual(InfluxDBClientOptions.AuthenticationScheme.Anonymous, options.AuthScheme); }
public class InfluxDbClientFactoryTest - Add test to check
Authorization
header. Something like:into[Test] public async Task Anonymous() { MockServer .Given(Request.Create().UsingGet()) .RespondWith(CreateResponse("{\"status\":\"active\"}", "application/json")); _client.Dispose(); _client = InfluxDBClientFactory.Create(new InfluxDBClientOptions.Builder() .Url(MockServerUrl) .Build()); await _client.GetAuthorizationsApi().FindAuthorizationByIdAsync("id"); var request = MockServer.LogEntries.Last(); CollectionAssert.DoesNotContain(request.RequestMessage.Headers.Keys, "Authorization"); }
public class InfluxDbClientTest : AbstractMockServerTest
2c93daf
to
2f6461c
Compare
It looks like your CLA link that gets autopopulated in your issue template no longer works. I think it changed to https://www.influxdata.com/legal/cla/. I submitted my info there. Let me know if thats the correct location. |
Yes, it is correct location. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks again for your PR 👍
LGTM 👌
Closes: #255
Proposed Changes
Allow anonymous requests to influx or telegraf.
Checklist
dotnet test
completes successfully