Class BasicAuthScope
- java.lang.Object
-
- org.apache.maven.wagon.shared.http.BasicAuthScope
-
public class BasicAuthScope extends java.lang.Object
- Since:
- 2.8
-
-
Constructor Summary
Constructors Constructor Description BasicAuthScope()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getHost()
java.lang.String
getPort()
java.lang.String
getRealm()
org.apache.http.auth.AuthScope
getScope(java.lang.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.org.apache.http.auth.AuthScope
getScope(org.apache.http.HttpHost targetHost)
Given a HttpHost, return scope with overrides from appropriate basicAuth configuration.void
setHost(java.lang.String host)
void
setPort(java.lang.String port)
void
setRealm(java.lang.String realm)
-
-
-
Method Detail
-
getHost
public java.lang.String getHost()
- Returns:
- the host
-
setHost
public void setHost(java.lang.String host)
- Parameters:
host
- the host to set
-
getRealm
public java.lang.String getRealm()
- Returns:
- the realm
-
setRealm
public void setRealm(java.lang.String realm)
- Parameters:
realm
- the realm to set
-
getScope
public org.apache.http.auth.AuthScope getScope(java.lang.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 valueport
- The server setting's /server/port value- Returns:
-
getPort
public java.lang.String getPort()
- Returns:
- the port
-
setPort
public void setPort(java.lang.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:
-
-