Package com.vonage.client.auth
Class TokenAuthMethod
java.lang.Object
com.vonage.client.auth.AbstractAuthMethod
com.vonage.client.auth.TokenAuthMethod
- All Implemented Interfaces:
AuthMethod,java.lang.Comparable<AuthMethod>
public class TokenAuthMethod extends AbstractAuthMethod
-
Constructor Summary
Constructors Constructor Description TokenAuthMethod(java.lang.String apiKey, java.lang.String apiSecret) -
Method Summary
Modifier and Type Method Description org.apache.http.client.methods.RequestBuilderapply(org.apache.http.client.methods.RequestBuilder request)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.intgetSortKey()
-
Constructor Details
-
Method Details
-
apply
public org.apache.http.client.methods.RequestBuilder apply(org.apache.http.client.methods.RequestBuilder request) -
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- Overrides:
applyAsBasicAuthin classAbstractAuthMethod- 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- Overrides:
applyAsJsonPropertiesin classAbstractAuthMethod- Parameters:
request- The request being built- Returns:
- RequestBuilder for more building of the request.
-
getSortKey
- Specified by:
getSortKeyin interfaceAuthMethod- Specified by:
getSortKeyin classAbstractAuthMethod
-