Class BasicAuthScope

java.lang.Object
org.apache.maven.wagon.shared.http.BasicAuthScope

public class BasicAuthScope extends Object
Since:
2.8
  • Constructor Details

    • BasicAuthScope

      public BasicAuthScope()
  • Method Details

    • getHost

      public String getHost()
      Returns:
      the host
    • setHost

      public void setHost(String host)
      Parameters:
      host - the host to set
    • getRealm

      public String getRealm()
      Returns:
      the realm
    • setRealm

      public void setRealm(String realm)
      Parameters:
      realm - the realm to set
    • getScope

      public org.apache.http.auth.AuthScope getScope(String host, int port)
      Create an authScope given the /repository/host and /repository/password and the /server/basicAuth or /server/proxyBasicAuth host, port and realm settings. The basicAuth setting should override the repository settings host and/or port if host, port or realm is set to "ANY".

      Realm can also be set to a specific string and will be set if /server/basicAuthentication/realm is non-null

      Parameters:
      host - The server setting's /server/host value
      port - The server setting's /server/port value
      Returns:
    • getPort

      public String getPort()
      Returns:
      the port
    • setPort

      public void setPort(String port)
      Parameters:
      port - the port to set
    • getScope

      public org.apache.http.auth.AuthScope getScope(org.apache.http.HttpHost targetHost)
      Given a HttpHost, return scope with overrides from appropriate basicAuth configuration.

      Note: Protocol is ignored. AuthScope impl ignores it as well, but if that changed, there could be a problem.

      Parameters:
      targetHost -
      Returns: