Class OAuthPlugin
java.lang.Object
org.codice.ddf.catalog.plugin.oauth.OAuthPlugin
- All Implemented Interfaces:
ddf.catalog.plugin.PreFederatedQueryPlugin
If a source is configured to use OAuth 2.0's Authorization Code flow, this plugin will verify
that the user has the required tokens to use OAuth 2.0 before proceeding to federate. If an
access token is present but has expired, this plugin will attempt to refresh it and update the
token storage with the new one. If the user is not logged in or needs to authorize the use of
their tokens against this source, an
OAuthPluginException will be thrown.-
Constructor Summary
ConstructorsConstructorDescriptionOAuthPlugin(org.codice.ddf.security.token.storage.api.TokenStorage tokenStorage) -
Method Summary
Modifier and TypeMethodDescriptionddf.catalog.operation.QueryRequestprocess(ddf.catalog.source.Source source, ddf.catalog.operation.QueryRequest input) Verifies that a source configured to use OAuth has a valid access token to process and that the user has authorized the use of their data against this source.
-
Constructor Details
-
OAuthPlugin
public OAuthPlugin(org.codice.ddf.security.token.storage.api.TokenStorage tokenStorage)
-
-
Method Details
-
process
public ddf.catalog.operation.QueryRequest process(ddf.catalog.source.Source source, ddf.catalog.operation.QueryRequest input) throws ddf.catalog.plugin.StopProcessingException Verifies that a source configured to use OAuth has a valid access token to process and that the user has authorized the use of their data against this source.- Specified by:
processin interfaceddf.catalog.plugin.PreFederatedQueryPlugin- Parameters:
source- source being queriedinput- query request- Throws:
ddf.catalog.plugin.OAuthPluginException- if the user's access token is not available or if the source is not authorizedddf.catalog.plugin.StopProcessingException- for errors not related to OAuth
-