Class PluginConfigWrapper

java.lang.Object
org.apache.drill.exec.server.rest.PluginConfigWrapper

public class PluginConfigWrapper extends Object
  • Constructor Details

  • Method Details

    • getName

      public String getName()
    • getConfig

      public StoragePluginConfig getConfig()
    • enabled

      public boolean enabled()
    • getUserName

      public String getUserName(String queryUser)
    • getPassword

      public String getPassword(String queryUser)
    • createOrUpdateInStorage

      public void createOrUpdateInStorage(StoragePluginRegistry storage) throws StoragePluginRegistry.PluginException
      Throws:
      StoragePluginRegistry.PluginException
    • isOauth

      public boolean isOauth()
      Determines whether the storage plugin in question needs the OAuth button in the UI. In order to be considered an OAuth plugin, the plugin must: 1. Use AbstractSecuredStoragePluginConfig 2. The credential provider must not be null 3. The credentialsProvider must contain a client_id and client_secret
      Returns:
      true if the plugin uses OAuth, false if not.
    • getClientID

      public String getClientID()
    • getAuthorizationURIWithParams

      public String getAuthorizationURIWithParams()
      This function generates the authorization URI for use when a non-admin user is authorizing OAuth2.0 access for a storage plugin. This function is necessary as we do not wish to expose any plugin configuration information to the user. If the plugin is not OAuth, or is missing components, the function will return an empty string.
      Returns:
      The authorization URI for an OAuth enabled plugin.