Class PluginConfigWrapper
java.lang.Object
org.apache.drill.exec.server.rest.PluginConfigWrapper
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
boolean
enabled()
This function generates the authorization URI for use when a non-admin user is authorizing OAuth2.0 access for a storage plugin.getName()
getPassword
(String queryUser) getUserName
(String queryUser) boolean
isOauth()
Determines whether the storage plugin in question needs the OAuth button in the UI.
-
Constructor Details
-
PluginConfigWrapper
-
-
Method Details
-
getName
-
getConfig
-
enabled
public boolean enabled() -
getUserName
-
getPassword
-
createOrUpdateInStorage
public void createOrUpdateInStorage(StoragePluginRegistry storage) 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
-
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.
-