public class BasicAuthRequestInterceptor extends Object implements RequestInterceptor
| Constructor and Description |
|---|
BasicAuthRequestInterceptor(String username,
String password)
Creates an interceptor that authenticates all requests with the specified username and password
encoded using ISO-8859-1.
|
BasicAuthRequestInterceptor(String username,
String password,
Charset charset)
Creates an interceptor that authenticates all requests with the specified username and password
encoded using the specified charset.
|
| Modifier and Type | Method and Description |
|---|---|
void |
apply(RequestTemplate template)
Called for every request.
|
public BasicAuthRequestInterceptor(String username, String password)
username - the username to use for authenticationpassword - the password to use for authenticationpublic BasicAuthRequestInterceptor(String username, String password, Charset charset)
username - the username to use for authenticationpassword - the password to use for authenticationcharset - the charset to use when encoding the credentialspublic void apply(RequestTemplate template)
RequestInterceptorRequestTemplate.apply in interface RequestInterceptorCopyright © 2012–2021 OpenFeign. All rights reserved.