
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) |
| Modifier and Type | Method and Description |
|---|---|
protected com.orientechnologies.orient.core.metadata.security.jwt.OJwtPayload |
createPayload(ODatabaseDocument db,
com.orientechnologies.orient.core.metadata.security.OSecurityUser user) |
protected OrientJwtHeader |
deserializeWebHeader(byte[] decodedHeader) |
protected com.orientechnologies.orient.core.metadata.security.jwt.OJwtPayload |
deserializeWebPayload(String type,
byte[] decodedPayload) |
byte[] |
getDistributedToken(ONetworkProtocolData data) |
protected com.orientechnologies.orient.core.metadata.security.jwt.OKeyProvider |
getKeyProvider() |
protected String |
getPayloadType(com.orientechnologies.orient.core.metadata.security.jwt.OJwtPayload payload) |
ONetworkProtocolData |
getProtocolDataFromToken(OClientConnection connection,
com.orientechnologies.orient.core.metadata.security.OToken token) |
long |
getSessionInMills() |
byte[] |
getSignedBinaryToken(ODatabaseDocumentInternal db,
com.orientechnologies.orient.core.metadata.security.OSecurityUser user,
ONetworkProtocolData data) |
byte[] |
getSignedWebToken(ODatabaseDocument db,
com.orientechnologies.orient.core.metadata.security.OSecurityUser user) |
boolean |
isEnabled() |
com.orientechnologies.orient.core.metadata.security.OToken |
parseBinaryToken(byte[] binaryToken) |
com.orientechnologies.orient.core.metadata.security.OToken |
parseNotVerifyBinaryToken(byte[] binaryToken) |
com.orientechnologies.orient.core.metadata.security.OToken |
parseWebToken(byte[] tokenBytes) |
byte[] |
renewIfNeeded(com.orientechnologies.orient.core.metadata.security.OToken token) |
protected byte[] |
serializeWebHeader(com.orientechnologies.orient.core.metadata.security.jwt.OJwtHeader header) |
protected byte[] |
serializeWebPayload(com.orientechnologies.orient.core.metadata.security.jwt.OJwtPayload payload) |
boolean |
validateBinaryToken(com.orientechnologies.orient.core.metadata.security.OToken token) |
boolean |
validateToken(com.orientechnologies.orient.core.metadata.security.OToken token,
String command,
String database) |
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 com.orientechnologies.orient.core.metadata.security.OToken parseWebToken(byte[] tokenBytes)
parseWebToken in interface OTokenHandlerpublic boolean validateToken(com.orientechnologies.orient.core.metadata.security.OToken token,
String command,
String database)
validateToken in interface OTokenHandlerpublic boolean validateBinaryToken(com.orientechnologies.orient.core.metadata.security.OToken token)
validateBinaryToken in interface OTokenHandlerpublic byte[] getSignedWebToken(ODatabaseDocument db, com.orientechnologies.orient.core.metadata.security.OSecurityUser user)
getSignedWebToken in interface OTokenHandlerpublic byte[] getDistributedToken(ONetworkProtocolData data)
getDistributedToken in interface OTokenHandlerpublic byte[] getSignedBinaryToken(ODatabaseDocumentInternal db, com.orientechnologies.orient.core.metadata.security.OSecurityUser user, ONetworkProtocolData data)
getSignedBinaryToken in interface OTokenHandlerpublic ONetworkProtocolData getProtocolDataFromToken(OClientConnection connection, com.orientechnologies.orient.core.metadata.security.OToken token)
getProtocolDataFromToken in interface OTokenHandlerpublic com.orientechnologies.orient.core.metadata.security.OToken parseNotVerifyBinaryToken(byte[] binaryToken)
parseNotVerifyBinaryToken in interface OTokenHandlerpublic com.orientechnologies.orient.core.metadata.security.OToken parseBinaryToken(byte[] binaryToken)
parseBinaryToken in interface OTokenHandlerpublic byte[] renewIfNeeded(com.orientechnologies.orient.core.metadata.security.OToken token)
renewIfNeeded in interface OTokenHandlerpublic long getSessionInMills()
public boolean isEnabled()
isEnabled in interface OTokenHandlerprotected OrientJwtHeader deserializeWebHeader(byte[] decodedHeader)
protected com.orientechnologies.orient.core.metadata.security.jwt.OJwtPayload deserializeWebPayload(String type, byte[] decodedPayload)
protected byte[] serializeWebHeader(com.orientechnologies.orient.core.metadata.security.jwt.OJwtHeader header)
throws Exception
Exceptionprotected byte[] serializeWebPayload(com.orientechnologies.orient.core.metadata.security.jwt.OJwtPayload payload)
throws Exception
Exceptionprotected com.orientechnologies.orient.core.metadata.security.jwt.OJwtPayload createPayload(ODatabaseDocument db, com.orientechnologies.orient.core.metadata.security.OSecurityUser user)
protected String getPayloadType(com.orientechnologies.orient.core.metadata.security.jwt.OJwtPayload payload)
protected com.orientechnologies.orient.core.metadata.security.jwt.OKeyProvider getKeyProvider()
Copyright © 2009–2018 OrientDB. All rights reserved.