Class SingleCredentialsProvider
- java.lang.Object
-
- org.apache.hc.client5.http.impl.auth.SingleCredentialsProvider
-
- All Implemented Interfaces:
CredentialsProvider
final class SingleCredentialsProvider extends java.lang.Object implements CredentialsProvider
-
-
Field Summary
Fields Modifier and Type Field Description private AuthScope
authScope
private Credentials
credentials
-
Constructor Summary
Constructors Constructor Description SingleCredentialsProvider(AuthScope authScope, java.lang.String username, char[] password)
SingleCredentialsProvider(AuthScope authScope, Credentials credentials)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Credentials
getCredentials(AuthScope authScope, org.apache.hc.core5.http.protocol.HttpContext context)
Returnscredentials
for the given authentication scope, if available.java.lang.String
toString()
-
-
-
Field Detail
-
authScope
private final AuthScope authScope
-
credentials
private final Credentials credentials
-
-
Constructor Detail
-
SingleCredentialsProvider
public SingleCredentialsProvider(AuthScope authScope, Credentials credentials)
-
SingleCredentialsProvider
public SingleCredentialsProvider(AuthScope authScope, java.lang.String username, char[] password)
-
-
Method Detail
-
getCredentials
public Credentials getCredentials(AuthScope authScope, org.apache.hc.core5.http.protocol.HttpContext context)
Description copied from interface:CredentialsProvider
Returnscredentials
for the given authentication scope, if available.- Specified by:
getCredentials
in interfaceCredentialsProvider
- Parameters:
authScope
- theauthentication scope
context
- thehttp context
- Returns:
- the credentials
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-