public class DefaultHttpAuthentication extends Object implements HttpAuthentication
Constructor and Description |
---|
DefaultHttpAuthentication(HttpAuthenticationType type) |
Modifier and Type | Method and Description |
---|---|
void |
authenticate(MuleEvent muleEvent,
HttpRequestBuilder requestBuilder)
Adds authentication information to the request.
|
String |
getPassword() |
HttpAuthenticationType |
getType() |
String |
getUsername() |
void |
setPassword(String password) |
void |
setUsername(String username) |
boolean |
shouldRetry(MuleEvent firstAttemptResponseEvent)
Detects if there was an authentication failure in the response.
|
public DefaultHttpAuthentication(HttpAuthenticationType type)
public String getUsername()
public void setUsername(String username)
public String getPassword()
public void setPassword(String password)
public HttpAuthenticationType getType()
public void authenticate(MuleEvent muleEvent, HttpRequestBuilder requestBuilder)
HttpAuthentication
authenticate
in interface HttpAuthentication
muleEvent
- The event that is being processed.requestBuilder
- The builder that is being used to create the HTTP request.public boolean shouldRetry(MuleEvent firstAttemptResponseEvent)
HttpAuthentication
shouldRetry
in interface HttpAuthentication
firstAttemptResponseEvent
- The event with the response of the request.Copyright © 2003–2015 MuleSoft, Inc.. All rights reserved.