public class OTokenHandlerImpl extends Object implements OTokenHandler
Modifier and Type | Field and Description |
---|---|
static String |
ENCRYPTION_ALGORITHM_DEFAULT |
protected static int |
JWT_DELIMITER |
TOKEN_HANDLER_NAME
Modifier | Constructor and Description |
---|---|
protected |
OTokenHandlerImpl() |
protected |
OTokenHandlerImpl(byte[] key,
long sessionLength,
String algorithm) |
|
OTokenHandlerImpl(OServer server) |
public static final String ENCRYPTION_ALGORITHM_DEFAULT
protected static final int JWT_DELIMITER
public OTokenHandlerImpl(OServer server)
protected OTokenHandlerImpl()
protected OTokenHandlerImpl(byte[] key, long sessionLength, String algorithm)
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[] getSignedWebTokenServerUser(OServerUserConfiguration user)
getSignedWebTokenServerUser
in interface OTokenHandler
public boolean validateServerUserToken(OToken token, String command, String database)
validateServerUserToken
in interface OTokenHandler
public byte[] getDistributedToken(ONetworkProtocolData data)
getDistributedToken
in interface OTokenHandler
public byte[] getSignedBinaryToken(ODatabaseDocumentInternal db, OSecurityUser user, ONetworkProtocolData data)
getSignedBinaryToken
in interface OTokenHandler
public ONetworkProtocolData getProtocolDataFromToken(OClientConnection connection, OToken token)
getProtocolDataFromToken
in interface OTokenHandler
public OToken parseNotVerifyBinaryToken(byte[] binaryToken)
parseNotVerifyBinaryToken
in interface OTokenHandler
public OToken parseBinaryToken(byte[] binaryToken)
parseBinaryToken
in interface OTokenHandler
public byte[] renewIfNeeded(OToken token)
renewIfNeeded
in interface OTokenHandler
public long getSessionInMills()
public boolean isEnabled()
isEnabled
in interface OTokenHandler
protected OrientJwtHeader deserializeWebHeader(byte[] decodedHeader)
protected OJwtPayload deserializeWebPayload(String type, byte[] decodedPayload)
protected byte[] serializeWebHeader(OJwtHeader header) throws Exception
Exception
protected byte[] serializeWebPayload(OJwtPayload payload) throws Exception
Exception
protected OJwtPayload createPayloadServerUser(OServerUserConfiguration serverUser)
protected OJwtPayload createPayload(ODatabaseDocument db, OSecurityUser user)
protected String getPayloadType(OJwtPayload payload)
protected OKeyProvider getKeyProvider()
public void setSessionInMills(long sessionInMills)
Copyright © 2009–2020 OrientDB. All rights reserved.