Package aQute.bnd.url

Class 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 URL Glob expressions
    • .oauth2Token — The password for basic authentication
    • Constructor Detail

      • BearerAuthentication

        public BearerAuthentication()
      • BearerAuthentication

        public BearerAuthentication​(java.lang.String oauth2Token,
                                    aQute.service.reporter.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 interface Plugin
        Overrides:
        setProperties in class DefaultURLConnectionHandler
        Parameters:
        map - attributes and directives for this plugin's clause
        Throws:
        java.lang.Exception
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object