com.ibm.commerce.me.commands

Interface LdapAuthenticationCmd

  • All Superinterfaces:
    com.ibm.websphere.command.CacheableCommand, com.ibm.commerce.command.CacheableECCommand, com.ibm.websphere.command.Command, com.ibm.websphere.command.CommandCaller, ECCommand, java.io.Serializable, com.ibm.websphere.command.TargetableCommand, TaskCommand


    public interface LdapAuthenticationCmd
    extends TaskCommand

    This task command will authenticate requisitioners (users of a B2B buyer organization) against LDAP. This task command will be called to perform either authentication or an update. This command will only be called if the server is configured to authenticate against LDAP.

    Before executing this task command the following setups should be performed:

                    setAuthenticationLevel
                    setBuyerCredentials
                    setMarketPlaceBuyerCredentials
                    setSupplierCredentilas
                    setMerchantKey
                    setUpdateFlag
     

    If the setUpdateFlag is called, upon execution of this task command, the credentials set are updated in the database.

    If the setUpdateFlag is not called, upon execution of this task command, verification of the credentials is performed. To determine whether the authentication was successful a call should be made to isValidCredentials().

    • Field Detail

      • defaultCommandClassName

        static final java.lang.String defaultCommandClassName
        Name of the default implementation of this command
        See Also:
        Constant Field Values
    • Method Detail

      • getErrorCode

        int getErrorCode()
        If the isValidCredentials() returns false (if authentication fails) then this method can be called to get the error code. This is required because the B2B scenario needs to know the exact reason for authentication failure.
        Returns:
        a code indicating the error status
      • isValidCredentials

        boolean isValidCredentials()
        After this command task is executed, a boolean result flag is set to indicate if authentication succeeds. This method will return this result flag to indicate if authentication succeeds.
        Returns:
        true if authentication succeeds.
      • setAuthenticationLevel

        void setAuthenticationLevel(int authenticationLevel)
        This method sets the authentication level (See B2BLogonCmd for details about against which credentials the buyer and supplier are validated.)
        Parameters:
        authenticationLevel - the new authentication level
      • setBuyerCredentials

        void setBuyerCredentials(Credentials buyerCredentials)
        This method sets the buyer credentials under which the current B2B user wishes to logon.
        Parameters:
        buyerCredentials - the new buyer credential information
      • setMarketPlaceBuyerCredentials

        void setMarketPlaceBuyerCredentials(Credentials mpBuyerCredentials)
        Use this method if the buyer comes from a marketplace and wants to be authenticated against the marketplace credentials. This method will set the marketplace buyer credentials under which the current B2B user wishes to logon.
        Parameters:
        mpBuyerCredentials - the marketplace buyer credential
      • setMerchantKey

        void setMerchantKey(java.lang.String strMerchantKey)
        This method sets the Merchant Key to use in the encryption of the password. This should only be set if an Enciphered Merchant key was not set.
        Parameters:
        strMerchantKey - the Merchant Key.
      • setSupplierCredentilas

        void setSupplierCredentilas(Credentials supplierCredentials)
        This method sets the supplier credentials for the store to which the buyer wants to connect.
        Parameters:
        supplierCredentials - the supplier credential information
      • setUpdateFlag

        void setUpdateFlag()
        This method is called to indicate instead of performing verification of the credentials, the credentials should be set in the database.