Class DefaultGigyaLoginService
java.lang.Object
de.hybris.platform.gigya.gigyaservices.login.impl.DefaultGigyaLoginService
- All Implemented Interfaces:
GigyaLoginService
- Direct Known Subclasses:
DefaultGigyaB2BLoginService
Default implementation of GigyaLoginService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfetchGigyaInfo(GigyaConfigModel gigyaConfig, String uid) Fetch user information from gigyaprotected GigyaUserObjectfetchRaasAccount(GigyaConfigModel gigyaConfig, String guid) Find customer using gigya UIDde.hybris.platform.servicelayer.internal.dao.GenericDao<GigyaConfigModel>de.hybris.platform.servicelayer.internal.dao.GenericDao<GigyaFieldMappingModel>de.hybris.platform.servicelayer.dto.converter.Converter<CustomerModel,com.gigya.socialize.GSObject> de.hybris.platform.servicelayer.internal.dao.GenericDao<CustomerModel>de.hybris.platform.servicelayer.model.ModelServicevoidnotifyGigyaOfLogout(GigyaConfigModel gigyaConfig, String uid) Notify gigya about logout informationprotected GigyaUserObjectprepareAndGetUserObject(com.fasterxml.jackson.databind.ObjectMapper mapper, com.gigya.socialize.GSResponse res) booleansendUserToGigya(UserModel userModel) Sends gigya user info in commerce to gigyavoidsetGigyaConfigGenericDao(de.hybris.platform.servicelayer.internal.dao.GenericDao<GigyaConfigModel> gigyaConfigGenericDao) voidsetGigyaFieldMappingGenericDao(de.hybris.platform.servicelayer.internal.dao.GenericDao<GigyaFieldMappingModel> gigyaFieldMappingGenericDao) voidsetGigyaKeyService(GigyaKeyService gigyaKeyService) voidsetGigyaService(GigyaService gigyaService) voidsetGigyaUserConverter(de.hybris.platform.servicelayer.dto.converter.Converter<CustomerModel, com.gigya.socialize.GSObject> gigyaUserConverter) voidsetGigyaUserGenericDao(de.hybris.platform.servicelayer.internal.dao.GenericDao<CustomerModel> gigyaUserGenericDao) voidsetModelService(de.hybris.platform.servicelayer.model.ModelService modelService) booleanverifyGigyaCall(GigyaConfigModel gigyaConfig, String uid, String uidSignature, String signatureTimeStamp) Method to verify gigya callprotected booleanverifyGigyaCallApiUser(String uid, String sig, String timestamp, GigyaConfigModel gigyaConfig) booleanverifyGigyaCallIdTokenExpiryAndSignature(GigyaConfigModel gigyaConfig, String idToken) Method to verify gigya call with Id Tokenprotected booleanverifyGigyaCallSiteSecret(String uid, String signature, String signatureTimeStamp, String siteSecret) booleanverifyGigyaCallWithIdToken(GigyaConfigModel gigyaConfig, String idToken) Deprecated, for removal: This API element is subject to removal in a future version.(use verifyGigyaCallIdTokenExpiryAndSignature instead)booleanverifyGigyaIdTokenContainsPayloadHash(String idToken, String payloadHash) Method to validate if the Id token in the gigya call contains the payload hashbooleanverifyGigyaIdTokenContainsUID(String idToken, String uid) Method to validate if the Id token in the gigya call contains the uid parameter
-
Constructor Details
-
DefaultGigyaLoginService
public DefaultGigyaLoginService()
-
-
Method Details
-
verifyGigyaCall
public boolean verifyGigyaCall(GigyaConfigModel gigyaConfig, String uid, String uidSignature, String signatureTimeStamp) Description copied from interface:GigyaLoginServiceMethod to verify gigya call- Specified by:
verifyGigyaCallin interfaceGigyaLoginService- Parameters:
gigyaConfig- the gigyaConfigModeluid- the uiduidSignature- the uid signaturesignatureTimeStamp- the signature timestamp- Returns:
- boolean - true if successfully verified
-
verifyGigyaCallWithIdToken
@Deprecated(since="2211", forRemoval=true) public boolean verifyGigyaCallWithIdToken(GigyaConfigModel gigyaConfig, String idToken) Deprecated, for removal: This API element is subject to removal in a future version.(use verifyGigyaCallIdTokenExpiryAndSignature instead)Description copied from interface:GigyaLoginServiceMethod to verify gigya call with Id Token- Specified by:
verifyGigyaCallWithIdTokenin interfaceGigyaLoginService- Parameters:
gigyaConfig- The gigyaConfig modelidToken- idToken returned by onLogin event- Returns:
- boolean - true if successfully verified
-
verifyGigyaCallIdTokenExpiryAndSignature
public boolean verifyGigyaCallIdTokenExpiryAndSignature(GigyaConfigModel gigyaConfig, String idToken) Description copied from interface:GigyaLoginServiceMethod to verify gigya call with Id Token- Specified by:
verifyGigyaCallIdTokenExpiryAndSignaturein interfaceGigyaLoginService- Parameters:
gigyaConfig- The gigyaConfig modelidToken- idToken returned by onLogin event- Returns:
- boolean - true if successfully verified
-
verifyGigyaIdTokenContainsUID
Description copied from interface:GigyaLoginServiceMethod to validate if the Id token in the gigya call contains the uid parameter- Specified by:
verifyGigyaIdTokenContainsUIDin interfaceGigyaLoginService- Parameters:
idToken- JWT Token sent by CDCuid- User ID of the CDC user- Returns:
- boolean
-
verifyGigyaIdTokenContainsPayloadHash
Description copied from interface:GigyaLoginServiceMethod to validate if the Id token in the gigya call contains the payload hash- Specified by:
verifyGigyaIdTokenContainsPayloadHashin interfaceGigyaLoginService- Parameters:
idToken- JWT Token sent by CDCpayloadHash- The SHA Hash of the CDC Webhook payload- Returns:
- boolean
-
findCustomerByGigyaUid
Description copied from interface:GigyaLoginServiceFind customer using gigya UID- Specified by:
findCustomerByGigyaUidin interfaceGigyaLoginService- Parameters:
uid- the uid- Returns:
- UserModel the user model
-
fetchGigyaInfo
Description copied from interface:GigyaLoginServiceFetch user information from gigya- Specified by:
fetchGigyaInfoin interfaceGigyaLoginService- Parameters:
gigyaConfig- the gigyaConfig modeluid- the uid- Returns:
- GigyaUserObject the gigya user object
-
fetchRaasAccount
protected GigyaUserObject fetchRaasAccount(GigyaConfigModel gigyaConfig, String guid) throws IOException - Throws:
IOException
-
prepareAndGetUserObject
protected GigyaUserObject prepareAndGetUserObject(com.fasterxml.jackson.databind.ObjectMapper mapper, com.gigya.socialize.GSResponse res) throws IOException - Throws:
IOException
-
notifyGigyaOfLogout
Description copied from interface:GigyaLoginServiceNotify gigya about logout information- Specified by:
notifyGigyaOfLogoutin interfaceGigyaLoginService- Parameters:
gigyaConfig- The gigyaConfig modeluid- - unique identifier
-
verifyGigyaCallSiteSecret
-
verifyGigyaCallApiUser
protected boolean verifyGigyaCallApiUser(String uid, String sig, String timestamp, GigyaConfigModel gigyaConfig) -
sendUserToGigya
Description copied from interface:GigyaLoginServiceSends gigya user info in commerce to gigya- Specified by:
sendUserToGigyain interfaceGigyaLoginService- Parameters:
userModel- The gigya user- Returns:
- boolean - true if successfully sent to gigya
-
getGigyaService
-
setGigyaService
-
getGigyaConfigGenericDao
public de.hybris.platform.servicelayer.internal.dao.GenericDao<GigyaConfigModel> getGigyaConfigGenericDao() -
setGigyaConfigGenericDao
public void setGigyaConfigGenericDao(de.hybris.platform.servicelayer.internal.dao.GenericDao<GigyaConfigModel> gigyaConfigGenericDao) -
getModelService
public de.hybris.platform.servicelayer.model.ModelService getModelService() -
setModelService
public void setModelService(de.hybris.platform.servicelayer.model.ModelService modelService) -
getGigyaFieldMappingGenericDao
public de.hybris.platform.servicelayer.internal.dao.GenericDao<GigyaFieldMappingModel> getGigyaFieldMappingGenericDao() -
setGigyaFieldMappingGenericDao
public void setGigyaFieldMappingGenericDao(de.hybris.platform.servicelayer.internal.dao.GenericDao<GigyaFieldMappingModel> gigyaFieldMappingGenericDao) -
getGigyaUserGenericDao
public de.hybris.platform.servicelayer.internal.dao.GenericDao<CustomerModel> getGigyaUserGenericDao() -
getGigyaUserConverter
public de.hybris.platform.servicelayer.dto.converter.Converter<CustomerModel,com.gigya.socialize.GSObject> getGigyaUserConverter() -
setGigyaUserGenericDao
public void setGigyaUserGenericDao(de.hybris.platform.servicelayer.internal.dao.GenericDao<CustomerModel> gigyaUserGenericDao) -
setGigyaUserConverter
public void setGigyaUserConverter(de.hybris.platform.servicelayer.dto.converter.Converter<CustomerModel, com.gigya.socialize.GSObject> gigyaUserConverter) -
setGigyaKeyService
-