public class OrientTokenHandler extends OServerPluginAbstract implements OTokenHandler, OServerPlugin
Modifier and Type | Field and Description |
---|---|
static String |
ENCRYPTION_ALGORITHM_PAR |
static String |
SESSION_LENGTH_PAR |
static String |
SIGN_KEY_PAR |
enabled
TOKEN_HANDLER_NAME
Constructor and Description |
---|
OrientTokenHandler() |
Modifier and Type | Method and Description |
---|---|
void |
config(OServer iServer,
OServerParameterConfiguration[] iParams)
Configures the handler.
|
byte[] |
getDistributedToken(ONetworkProtocolData data) |
String |
getName() |
ONetworkProtocolData |
getProtocolDataFromToken(OClientConnection oClientConnection,
OToken token) |
long |
getSessionInMills() |
byte[] |
getSignedBinaryToken(ODatabaseDocumentInternal db,
OSecurityUser user,
ONetworkProtocolData data) |
byte[] |
getSignedWebToken(ODatabaseDocument db,
OSecurityUser user) |
boolean |
isEnabled() |
OToken |
parseBinaryToken(byte[] binaryToken) |
OToken |
parseNotVerifyBinaryToken(byte[] tokenBytes) |
OToken |
parseWebToken(byte[] tokenBytes) |
byte[] |
renewIfNeeded(OToken token) |
boolean |
validateBinaryToken(OToken token) |
boolean |
validateToken(OToken token,
String command,
String database) |
getContent, onAfterClientRequest, onBeforeClientRequest, onClientConnection, onClientDisconnection, onClientError, sendShutdown, shutdown, startup
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getSignedWebTokenServerUser, validateServerUserToken
getContent, onAfterClientRequest, onBeforeClientRequest, onClientConnection, onClientDisconnection, onClientError, onSocketAccepted, onSocketDestroyed, sendShutdown
public static final String SIGN_KEY_PAR
public static final String SESSION_LENGTH_PAR
public static final String ENCRYPTION_ALGORITHM_PAR
public void config(OServer iServer, OServerParameterConfiguration[] iParams)
OServerPlugin
config
in interface OServerPlugin
config
in class OServerPluginAbstract
public OToken parseWebToken(byte[] tokenBytes)
parseWebToken
in interface OTokenHandler
public boolean validateToken(OToken token, String command, String database)
validateToken
in interface OTokenHandler
public boolean validateBinaryToken(OToken token)
validateBinaryToken
in interface OTokenHandler
public byte[] getSignedWebToken(ODatabaseDocument db, OSecurityUser user)
getSignedWebToken
in interface OTokenHandler
public byte[] getSignedBinaryToken(ODatabaseDocumentInternal db, OSecurityUser user, ONetworkProtocolData data)
getSignedBinaryToken
in interface OTokenHandler
public ONetworkProtocolData getProtocolDataFromToken(OClientConnection oClientConnection, OToken token)
getProtocolDataFromToken
in interface OTokenHandler
public byte[] getDistributedToken(ONetworkProtocolData data)
getDistributedToken
in interface OTokenHandler
public OToken parseBinaryToken(byte[] binaryToken)
parseBinaryToken
in interface OTokenHandler
public OToken parseNotVerifyBinaryToken(byte[] tokenBytes)
parseNotVerifyBinaryToken
in interface OTokenHandler
public byte[] renewIfNeeded(OToken token)
renewIfNeeded
in interface OTokenHandler
public long getSessionInMills()
public boolean isEnabled()
isEnabled
in interface OTokenHandler
Copyright © 2009–2020 OrientDB. All rights reserved.