Class DefaultPunchOutCredentialService
java.lang.Object
de.hybris.platform.b2b.punchout.services.impl.DefaultPunchOutCredentialService
- All Implemented Interfaces:
PunchOutCredentialService
Default implementation of
PunchOutCredentialService.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringextractIdentity(Credential credential) protected StringextractSharedSecret(Credential credential) protected ConfigurationServiceprotected PunchOutCredentialDaogetCustomerForCredential(Credential credential) Get the first validB2BCustomerModelthat is mapped for one of the pair domain and identity contained in the credential and validate the shared secret.protected B2BCustomerModelgetCustomerForCredential(Credential credential, boolean verifySharedSecret) getCustomerForCredentialNoAuth(Credential credential) Get the first validB2BCustomerModelthat is mapped for one of the pair domain and identity contained in the credential without validating the shared secret.Get the expired credentials that shared secret has not changed for configured days.getPunchOutCredential(String domain, String identity) Get anPunchOutCredentialModelbased on the domain and identity.voidsetConfigurationService(ConfigurationService configurationService) voidsetCredentialDao(PunchOutCredentialDao credentialDao)
-
Constructor Details
-
DefaultPunchOutCredentialService
public DefaultPunchOutCredentialService()
-
-
Method Details
-
getPunchOutCredential
Description copied from interface:PunchOutCredentialServiceGet anPunchOutCredentialModelbased on the domain and identity.- Specified by:
getPunchOutCredentialin interfacePunchOutCredentialService- Parameters:
domain- The domain of this identity (e.g.: DUNS).identity- The value of the identity.- Returns:
- The
PunchOutCredentialModelor null, if it cannot be found.
-
getCustomerForCredential
protected B2BCustomerModel getCustomerForCredential(Credential credential, boolean verifySharedSecret) -
getCustomerForCredential
Description copied from interface:PunchOutCredentialServiceGet the first validB2BCustomerModelthat is mapped for one of the pair domain and identity contained in the credential and validate the shared secret.- Specified by:
getCustomerForCredentialin interfacePunchOutCredentialService- Parameters:
credential- The credential that contains domain and identity.- Returns:
- The
B2BCustomerModelor null, if the credential is not mapped for any customer.
-
getCustomerForCredentialNoAuth
Description copied from interface:PunchOutCredentialServiceGet the first validB2BCustomerModelthat is mapped for one of the pair domain and identity contained in the credential without validating the shared secret.- Specified by:
getCustomerForCredentialNoAuthin interfacePunchOutCredentialService- Parameters:
credential- The credential that contains domain and identity.- Returns:
- The
B2BCustomerModelor null, if the credential is not mapped for any customer.
-
getExpiredPunchOutCredentials
Description copied from interface:PunchOutCredentialServiceGet the expired credentials that shared secret has not changed for configured days.- Specified by:
getExpiredPunchOutCredentialsin interfacePunchOutCredentialService- Returns:
- A bundle of
PunchOutCredentialModelor empty list, if there is not any expired credentials.
-
extractIdentity
-
getCredentialDao
-
setCredentialDao
-
getConfigurationService
-
setConfigurationService
-