Package com.nexmo.client.auth
Class AbstractAuthMethod
- java.lang.Object
-
- com.nexmo.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
All Methods Instance Methods Abstract Methods Concrete Methods 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()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.nexmo.client.auth.AuthMethod
apply
-
-
-
-
Constructor Detail
-
AbstractAuthMethod
public AbstractAuthMethod()
-
-
Method Detail
-
compareTo
public int compareTo(AuthMethod other)
- Specified by:
compareToin interfacejava.lang.Comparable<AuthMethod>
-
getSortKey
public abstract int 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.
-
-