Package com.vonage.client.auth
Class AbstractAuthMethod
java.lang.Object
com.vonage.client.auth.AbstractAuthMethod
- All Implemented Interfaces:
AuthMethod,java.lang.Comparable<AuthMethod>
- Direct Known Subclasses:
JWTAuthMethod,SignatureAuthMethod,TokenAuthMethod
public abstract class AbstractAuthMethod extends java.lang.Object implements AuthMethod
-
Constructor Summary
Constructors Constructor Description AbstractAuthMethod() -
Method Summary
Modifier and Type Method Description org.apache.http.client.methods.RequestBuilderapplyAsBasicAuth(org.apache.http.client.methods.RequestBuilder request)Apply the authentication to the header as basic authentication.org.apache.http.client.methods.RequestBuilderapplyAsJsonProperties(org.apache.http.client.methods.RequestBuilder request)Apply the authentication by adding it to the entity payload.intcompareTo(AuthMethod other)abstract intgetSortKey()
-
Constructor Details
-
AbstractAuthMethod
public AbstractAuthMethod()
-
-
Method Details
-
compareTo
- Specified by:
compareToin interfacejava.lang.Comparable<AuthMethod>
-
getSortKey
- Specified by:
getSortKeyin interfaceAuthMethod
-
applyAsBasicAuth
public org.apache.http.client.methods.RequestBuilder applyAsBasicAuth(org.apache.http.client.methods.RequestBuilder request)Description copied from interface:AuthMethodApply the authentication to the header as basic authentication.- Specified by:
applyAsBasicAuthin interfaceAuthMethod- Parameters:
request- The request being built- Returns:
- RequestBuilder for more building of the request.
-
applyAsJsonProperties
public org.apache.http.client.methods.RequestBuilder applyAsJsonProperties(org.apache.http.client.methods.RequestBuilder request)Description copied from interface:AuthMethodApply the authentication by adding it to the entity payload.- Specified by:
applyAsJsonPropertiesin interfaceAuthMethod- Parameters:
request- The request being built- Returns:
- RequestBuilder for more building of the request.
-