Class DefaultGigyaKeyService
java.lang.Object
de.hybris.platform.gigya.gigyaservices.keymanagement.impl.DefaultGigyaKeyService
- All Implemented Interfaces:
GigyaKeyService
Default implementation of GigyaKeyService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected GigyaJWTContentdecodeJWTContent(String encodedJwtContent) findPublicKeybyKeyId(String keyId) Retrieve the Public Key of the CDC Site, if stored previously.generatePublicKey(String modulus, String exponent) Method to generate public key from modulus and exponentretreivePublicKeyOfASite(GigyaConfigModel gigyaConfig, String checkKeyId) Method to retrieve public key of a CMSSitevoidsetGigyaPublicKeyGenericDao(de.hybris.platform.servicelayer.internal.dao.GenericDao<GigyaPublicKeyModel> gigyaPublicKeyGenericDao) voidsetGigyaService(GigyaService gigyaService) voidsetModelService(de.hybris.platform.servicelayer.model.ModelService modelService) validateToken(GigyaConfigModel gigyaConfig, String idToken) Deprecated, for removal: This API element is subject to removal in a future version.(use validateTokenExpiryAndSignature instead)validateTokenExpiryAndSignature(GigyaConfigModel gigyaConfig, String idToken) Method to validate idToken expiry and idToken signature of GigyavalidateTokenPayloadHash(String jwtToken, String payloadHash) Method to validate if JWT token contains the Payload HashvalidateTokenUID(String jwtToken, String uid) Method to validate if JWT token contains the UID
-
Constructor Details
-
DefaultGigyaKeyService
public DefaultGigyaKeyService()
-
-
Method Details
-
retreivePublicKeyOfASite
Description copied from interface:GigyaKeyServiceMethod to retrieve public key of a CMSSite- Specified by:
retreivePublicKeyOfASitein interfaceGigyaKeyService- Parameters:
gigyaConfig- The Gigya Config modelcheckKeyId- Key ID from ID Token- Returns:
- PublickKey of Site
-
generatePublicKey
Description copied from interface:GigyaKeyServiceMethod to generate public key from modulus and exponent- Specified by:
generatePublicKeyin interfaceGigyaKeyService- Parameters:
modulus- Modulus of Public Keyexponent- Exponent of Public Key- Returns:
- PublicKey
-
validateToken
@Deprecated(since="2211", forRemoval=true) public Boolean validateToken(GigyaConfigModel gigyaConfig, String idToken) Deprecated, for removal: This API element is subject to removal in a future version.(use validateTokenExpiryAndSignature instead)Description copied from interface:GigyaKeyServiceMethod to validate idToken of Gigya- Specified by:
validateTokenin interfaceGigyaKeyService- Parameters:
gigyaConfig- The Gigya Config modelidToken- ID Token sent by Gigya- Returns:
- Boolean
-
validateTokenExpiryAndSignature
Description copied from interface:GigyaKeyServiceMethod to validate idToken expiry and idToken signature of Gigya- Specified by:
validateTokenExpiryAndSignaturein interfaceGigyaKeyService- Parameters:
gigyaConfig- The Gigya Config modelidToken- ID Token sent by Gigya- Returns:
- Boolean
-
validateTokenUID
Description copied from interface:GigyaKeyServiceMethod to validate if JWT token contains the UID- Specified by:
validateTokenUIDin interfaceGigyaKeyService- Parameters:
jwtToken- JWT Token sent by CDCuid- User ID of the CDC user- Returns:
- Boolean
-
validateTokenPayloadHash
Description copied from interface:GigyaKeyServiceMethod to validate if JWT token contains the Payload Hash- Specified by:
validateTokenPayloadHashin interfaceGigyaKeyService- Parameters:
jwtToken- JWT Token sent by CDCpayloadHash- The SHA Hash of the CDC Webhook payload- Returns:
- Boolean
-
decodeJWTContent
-
findPublicKeybyKeyId
Retrieve the Public Key of the CDC Site, if stored previously.- Parameters:
keyId- - decoded kid present in the JWT header- Returns:
- GigyaPublicKeyModel
-
setGigyaService
-
setModelService
public void setModelService(de.hybris.platform.servicelayer.model.ModelService modelService) -
setGigyaPublicKeyGenericDao
public void setGigyaPublicKeyGenericDao(de.hybris.platform.servicelayer.internal.dao.GenericDao<GigyaPublicKeyModel> gigyaPublicKeyGenericDao)
-