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
public class BearerAuthentication extends DefaultURLConnectionHandler
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 URLGlobexpressions.oauth2Token— The password for basic authentication
-
-
Field Summary
-
Fields inherited from class aQute.bnd.url.DefaultURLConnectionHandler
registry
-
Fields inherited from interface aQute.bnd.service.url.URLConnectionHandler
MATCH
-
-
Constructor Summary
Constructors Constructor Description BearerAuthentication()BearerAuthentication(java.lang.String oauth2Token, aQute.service.reporter.Reporter reporter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidhandle(java.net.URLConnection connection)Not doing anything is perfect okvoidsetProperties(java.util.Map<java.lang.String,java.lang.String> map)Set the properties for this plugin.java.lang.StringtoString()-
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
-
-
-
-
Method Detail
-
setProperties
public void setProperties(java.util.Map<java.lang.String,java.lang.String> map) throws java.lang.ExceptionDescription copied from class:DefaultURLConnectionHandlerSet the properties for this plugin. Subclasses should call this method before they handle their own properties.- Specified by:
setPropertiesin interfacePlugin- Overrides:
setPropertiesin classDefaultURLConnectionHandler- Parameters:
map- attributes and directives for this plugin's clause- Throws:
java.lang.Exception
-
handle
public void handle(java.net.URLConnection connection)
Description copied from class:DefaultURLConnectionHandlerNot doing anything is perfect ok- Specified by:
handlein interfaceURLConnectionHandler- Overrides:
handlein classDefaultURLConnectionHandler- Parameters:
connection- The connection to modify
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-