Package aQute.bnd.url
Class BearerAuthentication
- java.lang.Object
-
- aQute.bnd.url.DefaultURLConnectionHandler
-
- aQute.bnd.url.BearerAuthentication
-
- All Implemented Interfaces:
Plugin
,RegistryPlugin
,URLConnectionHandler
,Report
,Reporter
public class BearerAuthentication extends DefaultURLConnectionHandler
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static interface
BearerAuthentication.Config
-
Nested classes/interfaces inherited from interface aQute.service.reporter.Report
Report.Location
-
Nested classes/interfaces inherited from interface aQute.service.reporter.Reporter
Reporter.SetLocation
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
authentication
private static java.lang.String
HEADER_AUTHORIZATION
private static org.slf4j.Logger
logger
private java.lang.String
oauth2Token
private static java.lang.String
PREFIX_BEARER_AUTH
-
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, Reporter reporter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
handle(java.net.URLConnection connection)
Not doing anything is perfect okvoid
setProperties(java.util.Map<java.lang.String,java.lang.String> map)
Set the properties for this plugin.java.lang.String
toString()
-
Methods inherited from class aQute.bnd.url.DefaultURLConnectionHandler
addMatcher, error, exception, getErrors, getLocation, getWarnings, isOk, isPedantic, matches, matches, progress, setRegistry, setReporter, trace, warning
-
-
-
-
Field Detail
-
logger
private static final org.slf4j.Logger logger
-
HEADER_AUTHORIZATION
private static final java.lang.String HEADER_AUTHORIZATION
- See Also:
- Constant Field Values
-
PREFIX_BEARER_AUTH
private static final java.lang.String PREFIX_BEARER_AUTH
- See Also:
- Constant Field Values
-
oauth2Token
private java.lang.String oauth2Token
-
authentication
private java.lang.String authentication
-
-
Constructor Detail
-
BearerAuthentication
public BearerAuthentication()
-
BearerAuthentication
public BearerAuthentication(java.lang.String oauth2Token, Reporter reporter)
-
-
Method Detail
-
setProperties
public void setProperties(java.util.Map<java.lang.String,java.lang.String> map) throws java.lang.Exception
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:
java.lang.Exception
-
handle
public void handle(java.net.URLConnection connection)
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
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-