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 StringgetAuthType()Gets the auth handler type of the instance.StringgetPassword()StringgetUsername()voidsetAuthHeader(MessageContext messageContext)This method will set the Authorization header with the relevant auth token.
-
-
-
Method Detail
-
getAuthType
public String getAuthType()
Description copied from interface:AuthHandlerGets the auth handler type of the instance.- Specified by:
getAuthTypein interfaceAuthHandler
-
setAuthHeader
public void setAuthHeader(MessageContext messageContext) throws AuthException
Description copied from interface:AuthHandlerThis method will set the Authorization header with the relevant auth token.- Specified by:
setAuthHeaderin 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()
-
-