You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by GitBox <gi...@apache.org> on 2022/01/11 20:46:13 UTC

[GitHub] [drill] cgivre commented on a change in pull request #2401: DRILL-8056: Add OAuth2 Support for HTTP Rest Plugin

cgivre commented on a change in pull request #2401:
URL: https://github.com/apache/drill/pull/2401#discussion_r782512496



##########
File path: exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/StorageResources.java
##########
@@ -180,6 +193,48 @@ public Response enablePlugin(@PathParam("name") String name, @PathParam("val") B
     }
   }
 
+  @GET
+  @Path("/storage/{name}/update_oath2_authtoken")
+  @Produces(MediaType.TEXT_HTML)
+  public Response updateAuthToken(@PathParam("name") String name, @QueryParam("code") String code) {
+    try {
+      if (storage.getPlugin(name).getConfig().getClass().getSimpleName().equalsIgnoreCase("HttpStoragePluginConfig")) {
+        HttpStoragePluginConfig config = (HttpStoragePluginConfig)storage.getPlugin(name).getConfig();

Review comment:
       I refactored this so that it uses the `credentialProvider` to store the credentials. 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@drill.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org