Package com.abiquo.apiclient.auth
Class TokenAuthentication
- java.lang.Object
-
- com.abiquo.apiclient.auth.TokenAuthentication
-
- All Implemented Interfaces:
Authentication
public class TokenAuthentication extends Object implements Authentication
Token based Authentication.- Author:
- Ignasi Barrera
-
-
Field Summary
Fields Modifier and Type Field Description static StringAUTH_HEADERName of the header in the HTTP responses that carries the renewed authentication token.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.squareup.okhttp.Requestauthenticate(com.squareup.okhttp.Request unauthenticated)Authenticates the given request.static TokenAuthenticationtoken(String token)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.abiquo.apiclient.auth.Authentication
allowAbiquoToken
-
-
-
-
Field Detail
-
AUTH_HEADER
public static final String AUTH_HEADER
Name of the header in the HTTP responses that carries the renewed authentication token.- See Also:
- Constant Field Values
-
-
Method Detail
-
token
public static TokenAuthentication token(String token)
-
authenticate
public com.squareup.okhttp.Request authenticate(com.squareup.okhttp.Request unauthenticated)
Description copied from interface:AuthenticationAuthenticates the given request.- Specified by:
authenticatein interfaceAuthentication- Parameters:
unauthenticated- The request to authenticate.- Returns:
- The authenticated request.
-
-