Class BasicAuthHandler
- java.lang.Object
-
- org.apache.synapse.endpoints.auth.basicauth.BasicAuthHandler
-
- All Implemented Interfaces:
AuthHandler
public class BasicAuthHandler extends Object implements AuthHandler
This class is used to handle Basic Authorization.
-
-
Constructor Summary
Constructors Constructor Description BasicAuthHandler(String username, String password)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getAuthType()
Gets the auth handler type of the instance.String
getPassword()
String
getUsername()
void
setAuthHeader(MessageContext messageContext)
This method will set the Authorization header with the relevant auth token.
-
-
-
Method Detail
-
getAuthType
public String getAuthType()
Description copied from interface:AuthHandler
Gets the auth handler type of the instance.- Specified by:
getAuthType
in interfaceAuthHandler
-
setAuthHeader
public void setAuthHeader(MessageContext messageContext) throws AuthException
Description copied from interface:AuthHandler
This method will set the Authorization header with the relevant auth token.- Specified by:
setAuthHeader
in interfaceAuthHandler
- Parameters:
messageContext
- Message context to which the token needs to be set- Throws:
AuthException
- In the event of errors when generating new token
-
getUsername
public String getUsername()
-
getPassword
public String getPassword()
-
-