Class OTokenHandlerImpl
java.lang.Object
com.orientechnologies.orient.server.token.OTokenHandlerImpl
- All Implemented Interfaces:
OTokenHandler
Created by emrul on 27/10/2014.
- Author:
- Emrul Islam <emrul@emrul.com> Copyright 2014 Emrul Islam
-
Field Summary
FieldsFields inherited from interface com.orientechnologies.orient.server.OTokenHandler
TOKEN_HANDLER_NAME -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedprotectedOTokenHandlerImpl(byte[] key, long sessionLength, String algorithm) protectedOTokenHandlerImpl(OTokenSign sign, long sessionLength) OTokenHandlerImpl(OTokenSign sign, OContextConfiguration config) -
Method Summary
Modifier and TypeMethodDescriptionprotected OJwtPayloadcreatePayload(ODatabaseDocument db, OSecurityUser user) protected OJwtPayloadcreatePayloadServerUser(OSecurityUser serverUser) protected OrientJwtHeaderdeserializeWebHeader(byte[] decodedHeader) protected OJwtPayloaddeserializeWebPayload(String type, byte[] decodedPayload) protected StringgetPayloadType(OJwtPayload payload) getProtocolDataFromToken(OClientConnection connection, OToken token) longbyte[]byte[]getSignedWebToken(ODatabaseDocument db, OSecurityUser user) byte[]booleanparseBinaryToken(byte[] binaryToken) parseNotVerifyBinaryToken(byte[] binaryToken) parseOnlyBinary(byte[] binaryToken) parseOnlyWebToken(byte[] tokenBytes) parseWebToken(byte[] tokenBytes) byte[]renewIfNeeded(OToken token) protected byte[]serializeWebHeader(OTokenHeader header) protected byte[]serializeWebPayload(OJwtPayload payload) voidsetSessionInMills(long sessionInMills) booleanvalidateBinaryToken(OToken token) booleanvalidateBinaryToken(OParsedToken token) booleanvalidateServerUserToken(OToken token, String command, String database) booleanvalidateToken(OToken token, String command, String database) booleanvalidateToken(OParsedToken token, String command, String database)
-
Field Details
-
JWT_DELIMITER
protected static final int JWT_DELIMITER- See Also:
-
-
Constructor Details
-
OTokenHandlerImpl
-
OTokenHandlerImpl
-
OTokenHandlerImpl
-
OTokenHandlerImpl
-
OTokenHandlerImpl
protected OTokenHandlerImpl()
-
-
Method Details
-
parseWebToken
- Specified by:
parseWebTokenin interfaceOTokenHandler
-
parseOnlyWebToken
- Specified by:
parseOnlyWebTokenin interfaceOTokenHandler
-
validateToken
- Specified by:
validateTokenin interfaceOTokenHandler
-
validateToken
- Specified by:
validateTokenin interfaceOTokenHandler
-
validateBinaryToken
- Specified by:
validateBinaryTokenin interfaceOTokenHandler
-
validateBinaryToken
- Specified by:
validateBinaryTokenin interfaceOTokenHandler
-
getSignedWebToken
- Specified by:
getSignedWebTokenin interfaceOTokenHandler
-
getSignedWebTokenServerUser
- Specified by:
getSignedWebTokenServerUserin interfaceOTokenHandler
-
validateServerUserToken
- Specified by:
validateServerUserTokenin interfaceOTokenHandler
-
getSignedBinaryToken
public byte[] getSignedBinaryToken(ODatabaseDocumentInternal db, OSecurityUser user, ONetworkProtocolData data) - Specified by:
getSignedBinaryTokenin interfaceOTokenHandler
-
getProtocolDataFromToken
- Specified by:
getProtocolDataFromTokenin interfaceOTokenHandler
-
parseNotVerifyBinaryToken
- Specified by:
parseNotVerifyBinaryTokenin interfaceOTokenHandler
-
parseOnlyBinary
- Specified by:
parseOnlyBinaryin interfaceOTokenHandler
-
parseBinaryToken
- Specified by:
parseBinaryTokenin interfaceOTokenHandler
-
renewIfNeeded
- Specified by:
renewIfNeededin interfaceOTokenHandler
-
getSessionInMills
public long getSessionInMills() -
isEnabled
public boolean isEnabled()- Specified by:
isEnabledin interfaceOTokenHandler
-
deserializeWebHeader
-
deserializeWebPayload
-
serializeWebHeader
- Throws:
Exception
-
serializeWebPayload
- Throws:
Exception
-
createPayloadServerUser
-
createPayload
-
getPayloadType
-
setSessionInMills
public void setSessionInMills(long sessionInMills)
-