Package aQute.bnd.url
Class BearerAuthentication
java.lang.Object
aQute.bnd.url.DefaultURLConnectionHandler
aQute.bnd.url.BearerAuthentication
- All Implemented Interfaces:
Plugin
,RegistryPlugin
,URLConnectionHandler
,aQute.service.reporter.Report
,aQute.service.reporter.Reporter
Provide Http Bearer Authentication. This URL Connection Handler plugin will
add bearer authentication to the matching URL Connections. The following
properties must be specified.
MATCH
— The URLGlob
expressions.oauth2Token
— The password for basic authentication
-
Nested Class Summary
Nested classes/interfaces inherited from interface aQute.service.reporter.Report
aQute.service.reporter.Report.Location
Nested classes/interfaces inherited from interface aQute.service.reporter.Reporter
aQute.service.reporter.Reporter.SetLocation
-
Field Summary
Fields inherited from class aQute.bnd.url.DefaultURLConnectionHandler
registry
Fields inherited from interface aQute.bnd.service.url.URLConnectionHandler
MATCH
-
Constructor Summary
ConstructorsConstructorDescriptionBearerAuthentication
(String oauth2Token, aQute.service.reporter.Reporter reporter) -
Method Summary
Modifier and TypeMethodDescriptionvoid
handle
(URLConnection connection) Not doing anything is perfect okvoid
setProperties
(Map<String, String> map) Set the properties for this plugin.toString()
Methods inherited from class aQute.bnd.url.DefaultURLConnectionHandler
addMatcher, error, exception, getErrors, getLocation, getWarnings, isOk, isPedantic, matches, matches, progress, setRegistry, setReporter, trace, warning
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface aQute.bnd.service.url.URLConnectionHandler
maxConcurrentConnections
-
Constructor Details
-
BearerAuthentication
public BearerAuthentication() -
BearerAuthentication
-
-
Method Details
-
setProperties
Description copied from class:DefaultURLConnectionHandler
Set the properties for this plugin. Subclasses should call this method before they handle their own properties.- Specified by:
setProperties
in interfacePlugin
- Overrides:
setProperties
in classDefaultURLConnectionHandler
- Parameters:
map
- attributes and directives for this plugin's clause- Throws:
Exception
-
handle
Description copied from class:DefaultURLConnectionHandler
Not doing anything is perfect ok- Specified by:
handle
in interfaceURLConnectionHandler
- Overrides:
handle
in classDefaultURLConnectionHandler
- Parameters:
connection
- The connection to modify
-
toString
-