-
Notifications
You must be signed in to change notification settings - Fork 476
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
Support for Basic Authentication #492
Conversation
Codecov Report
@@ Coverage Diff @@
## master #492 +/- ##
===========================================
+ Coverage 87.35% 87.4% +0.04%
- Complexity 362 364 +2
===========================================
Files 24 25 +1
Lines 1503 1500 -3
Branches 167 167
===========================================
- Hits 1313 1311 -2
+ Misses 124 123 -1
Partials 66 66
Continue to review full report at Codecov.
|
LGTM |
Hi @lxhoan would you mind adding a CHANGELOG entry ? |
changelog added |
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.
With this PR, we will create a new minor version that is not backward compatible. Is this correct or I am missing something?
with reference to InfluxDb document https://docs.influxdata.com/influxdb/v1.6/administration/authentication_and_authorization/ https://docs.influxdata.com/influxdb/v1.6/administration/authentication_and_authorization/ basic authentication "is the preferred method for providing user credentials" |
@lxhoan ok but you modified the existing public API by removing parameters and this will break the existing users implementation when they update the library. |
@@ -39,49 +39,44 @@ | |||
* Can be one of one, any, all, quorum. Defaults to all. | |||
*/ | |||
@POST("write") | |||
public Call<ResponseBody> writePoints(@Query(U) String username, | |||
@Query(P) String password, @Query(DB) String database, | |||
public Call<ResponseBody> writePoints(@Query(DB) String database, |
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.
parameters removed: (non-backward compatible change)
@Query(RP) String retentionPolicy, @Query(PRECISION) String precision, | ||
@Query(CONSISTENCY) String consistency, @Body RequestBody batchPoints); | ||
|
||
@GET("query") | ||
public Call<QueryResult> query(@Query(U) String username, @Query(P) String password, @Query(DB) String db, | ||
public Call<QueryResult> query(@Query(DB) String db, |
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.
parameters removed: (non-backward compatible change)
@Query(EPOCH) String epoch, @Query(value = Q, encoded = true) String query); | ||
|
||
@POST("query") | ||
public Call<QueryResult> query(@Query(U) String username, @Query(P) String password, @Query(DB) String db, | ||
public Call<QueryResult> query(@Query(DB) String db, |
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.
parameters removed: (non-backward compatible change)
@Query(EPOCH) String epoch, @Query(value = Q, encoded = true) String query, | ||
@Query(value = PARAMS, encoded = true) String params); | ||
|
||
@GET("query") | ||
public Call<QueryResult> query(@Query(U) String username, @Query(P) String password, @Query(DB) String db, | ||
public Call<QueryResult> query(@Query(DB) String db, |
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.
parameters removed: (non-backward compatible change)
@Query(value = Q, encoded = true) String query); | ||
|
||
@POST("query") | ||
public Call<QueryResult> postQuery(@Query(U) String username, @Query(P) String password, @Query(DB) String db, | ||
public Call<QueryResult> postQuery(@Query(DB) String db, |
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.
parameters removed: (non-backward compatible change)
@Query(value = Q, encoded = true) String query); | ||
|
||
@POST("query") | ||
public Call<QueryResult> postQuery(@Query(U) String username, @Query(P) String password, @Query(DB) String db, | ||
public Call<QueryResult> postQuery(@Query(DB) String db, |
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.
parameters removed: (non-backward compatible change)
@Query(value = Q, encoded = true) String query, @Query(value = PARAMS, encoded = true) String params); | ||
|
||
@GET("query") | ||
public Call<QueryResult> query(@Query(U) String username, @Query(P) String password, | ||
@Query(value = Q, encoded = true) String query); | ||
public Call<QueryResult> query(@Query(value = Q, encoded = true) String query); |
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.
parameters removed: (non-backward compatible change)
|
||
@POST("query") | ||
public Call<QueryResult> postQuery(@Query(U) String username, | ||
@Query(P) String password, @Query(value = Q, encoded = true) String query); | ||
public Call<QueryResult> postQuery(@Query(value = Q, encoded = true) String query); |
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.
parameters removed: (non-backward compatible change)
|
||
@Streaming | ||
@GET("query?chunked=true") | ||
public Call<ResponseBody> query(@Query(U) String username, | ||
@Query(P) String password, @Query(DB) String db, @Query(value = Q, encoded = true) String query, | ||
public Call<ResponseBody> query(@Query(DB) String db, @Query(value = Q, encoded = true) String query, |
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.
parameters removed: (non-backward compatible change)
@Query(CHUNK_SIZE) int chunkSize); | ||
|
||
@Streaming | ||
@POST("query?chunked=true") | ||
public Call<ResponseBody> query(@Query(U) String username, | ||
@Query(P) String password, @Query(DB) String db, @Query(value = Q, encoded = true) String query, | ||
public Call<ResponseBody> query(@Query(DB) String db, @Query(value = Q, encoded = true) String query, |
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.
parameters removed: (non-backward compatible change)
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.
No, InfluxDBService provides only a internal API which @lxhoan adopted, the only visible API is InfluxDB,java and that didnt change.
Or did i miss something ?
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.
the method signatures are all public however the interface (InfluxDBService) itself is visible to org.influxdb.impl only, so I don't think user can import this interface in their implementation
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.
Ops! I missed the class access modifier!
No description provided.