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 AuthScopeauthScopeprivate Credentialscredentials
-
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 CredentialsgetCredentials(AuthScope authScope, org.apache.hc.core5.http.protocol.HttpContext context)Returnscredentialsfor the given authentication scope, if available.java.lang.StringtoString()
-
-
-
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:CredentialsProviderReturnscredentialsfor the given authentication scope, if available.- Specified by:
getCredentialsin interfaceCredentialsProvider- Parameters:
authScope- theauthentication scopecontext- thehttp context- Returns:
- the credentials
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-