Class DefaultPunchOutCredentialService
- java.lang.Object
-
- de.hybris.platform.b2b.punchout.services.impl.DefaultPunchOutCredentialService
-
- All Implemented Interfaces:
PunchOutCredentialService
public class DefaultPunchOutCredentialService extends java.lang.Object implements PunchOutCredentialService
Default implementation ofPunchOutCredentialService.
-
-
Constructor Summary
Constructors Constructor Description DefaultPunchOutCredentialService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.StringextractIdentity(Credential credential)protected java.lang.StringextractSharedSecret(Credential credential)PunchOutCredentialDaogetCredentialDao()B2BCustomerModelgetCustomerForCredential(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)B2BCustomerModelgetCustomerForCredentialNoAuth(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.PunchOutCredentialModelgetPunchOutCredential(java.lang.String domain, java.lang.String identity)Get anPunchOutCredentialModelbased on the domain and identity.voidsetCredentialDao(PunchOutCredentialDao credentialDao)
-
-
-
Method Detail
-
getPunchOutCredential
public PunchOutCredentialModel getPunchOutCredential(java.lang.String domain, java.lang.String identity)
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
public B2BCustomerModel getCustomerForCredential(Credential credential)
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
public B2BCustomerModel getCustomerForCredentialNoAuth(Credential credential)
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.
-
extractIdentity
protected java.lang.String extractIdentity(Credential credential)
-
extractSharedSecret
protected java.lang.String extractSharedSecret(Credential credential)
-
getCredentialDao
public PunchOutCredentialDao getCredentialDao()
-
setCredentialDao
public void setCredentialDao(PunchOutCredentialDao credentialDao)
-
-