Package com.nexmo.client.auth
Class TokenAuthMethod
- java.lang.Object
-
- com.nexmo.client.auth.AbstractAuthMethod
-
- com.nexmo.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
All Methods Instance Methods Concrete Methods 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()-
Methods inherited from class com.nexmo.client.auth.AbstractAuthMethod
compareTo
-
-
-
-
Constructor Detail
-
TokenAuthMethod
public TokenAuthMethod(java.lang.String apiKey, java.lang.String apiSecret)
-
-
Method Detail
-
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
public int getSortKey()
- Specified by:
getSortKeyin interfaceAuthMethod- Specified by:
getSortKeyin classAbstractAuthMethod
-
-