public class RestHandler extends Object
| Modifier and Type | Class and Description |
|---|---|
class |
RestHandler.AuthData |
| Modifier and Type | Field and Description |
|---|---|
static String |
COOKIENAME |
| Constructor and Description |
|---|
RestHandler() |
| Modifier and Type | Method and Description |
|---|---|
void |
checkAuthCookie(javax.ws.rs.core.Cookie authCookie)
Authorization data is decrypted from the cookie
|
org.cristalise.kernel.lookup.AgentPath |
checkAuthData(String authData)
Authorization data is decrypted from the input string and the corresponding AgentPath is returned
|
protected String |
encryptAuthData(RestHandler.AuthData auth) |
org.cristalise.kernel.entity.proxy.AgentProxy |
getAgent(String agentName,
javax.ws.rs.core.Cookie authCookie)
AgentProxy is resolved either from cookie or from the name.
|
org.cristalise.kernel.entity.proxy.AgentProxy |
getAgent(String agentName,
String authData)
AgentProxy is resolved either from authorisation data or from the name.
|
javax.ws.rs.core.Response |
toJSON(Object data) |
public static final String COOKIENAME
protected String encryptAuthData(RestHandler.AuthData auth) throws IllegalBlockSizeException, BadPaddingException
public javax.ws.rs.core.Response toJSON(Object data)
public void checkAuthCookie(javax.ws.rs.core.Cookie authCookie)
authCookie - the cookie sent by the clientpublic org.cristalise.kernel.lookup.AgentPath checkAuthData(String authData)
authData - authorisation data normally taken from cookie or tokenpublic org.cristalise.kernel.entity.proxy.AgentProxy getAgent(String agentName, javax.ws.rs.core.Cookie authCookie)
agentName - the name of the AgentauthCookie - the cookie sent by the clientpublic org.cristalise.kernel.entity.proxy.AgentProxy getAgent(String agentName, String authData)
agentName - the name of the AgentauthData - authorisation data (from cookie or token)Copyright © 2017 CRISTAL-iSE. All rights reserved.