Class AuthKeyAuthentication
- java.lang.Object
-
- com.jalios.rest.client.authentication.AuthKeyAuthentication
-
- All Implemented Interfaces:
Authentication
public class AuthKeyAuthentication extends java.lang.Object implements Authentication
JCMS Open API Authentication using authentication key. Many such authentication may been added to a single ClientSession. To use it in prefix mode, the constructor with three arguments has to be used.- Since:
- JCMS-6.0
- Author:
- dissert
-
-
Constructor Summary
Constructors Constructor Description AuthKeyAuthentication(java.lang.String url)OpenAPI Authentication based on authentication key for a single url.AuthKeyAuthentication(java.lang.String url, java.lang.String authKey)OpenAPI Authentication based on authentication key for a single url.AuthKeyAuthentication(java.lang.String url, java.lang.String authKey, boolean prefix)OpenAPI Authentication based on authentication key for a single url.AuthKeyAuthentication(org.restlet.data.Reference ref)OpenAPI Authentication based on authentication key for a single url.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAuthentication(org.restlet.data.Request request)static org.restlet.data.ReferencegetReferenceUriWithAuthKey(java.lang.String url, java.lang.String authKey)static org.restlet.data.ReferencegetReferenceWithAuthKey(org.restlet.data.Reference reference, java.lang.String authKey)booleanisDeprecated()A authentication may be available for a few time.static booleanremoveAuthKey(org.restlet.data.Reference reference)org.restlet.data.ResponseupdateAuthenticationResult(ClientSession session, org.restlet.data.Request request, org.restlet.data.Response response)
-
-
-
Constructor Detail
-
AuthKeyAuthentication
public AuthKeyAuthentication(java.lang.String url, java.lang.String authKey)OpenAPI Authentication based on authentication key for a single url.- Parameters:
url-authKey-
-
AuthKeyAuthentication
public AuthKeyAuthentication(java.lang.String url, java.lang.String authKey, boolean prefix)OpenAPI Authentication based on authentication key for a single url.- Parameters:
url-authKey-prefix- if true, the url is considered as a prefix of url for wich the authKey is supposed to be good.
-
AuthKeyAuthentication
public AuthKeyAuthentication(java.lang.String url)
OpenAPI Authentication based on authentication key for a single url.- Parameters:
url- it included the authKey parameter
-
AuthKeyAuthentication
public AuthKeyAuthentication(org.restlet.data.Reference ref)
OpenAPI Authentication based on authentication key for a single url.- Parameters:
ref- it included the authKey parameter
-
-
Method Detail
-
addAuthentication
public void addAuthentication(org.restlet.data.Request request)
- Specified by:
addAuthenticationin interfaceAuthentication
-
updateAuthenticationResult
public org.restlet.data.Response updateAuthenticationResult(ClientSession session, org.restlet.data.Request request, org.restlet.data.Response response)
- Specified by:
updateAuthenticationResultin interfaceAuthentication
-
getReferenceUriWithAuthKey
public static org.restlet.data.Reference getReferenceUriWithAuthKey(java.lang.String url, java.lang.String authKey)
-
getReferenceWithAuthKey
public static org.restlet.data.Reference getReferenceWithAuthKey(org.restlet.data.Reference reference, java.lang.String authKey)
-
removeAuthKey
public static boolean removeAuthKey(org.restlet.data.Reference reference)
-
isDeprecated
public boolean isDeprecated()
Description copied from interface:AuthenticationA authentication may be available for a few time. If it is no longer, it is Deprecated- Specified by:
isDeprecatedin interfaceAuthentication- Returns:
- true if the method is no longer available
-
-