Freigeben über


CommerceDirectMailerAuthenticationModule Class

For the latest version of Commerce Server 2007 Help, see the Microsoft Web site.

A CommerceDirectMailer authentication http module provides the authentication functionality for Direct Mailer. This class cannot be inherited.

Namespace:  Microsoft.CommerceServer.Runtime
Assembly:  Microsoft.CommerceServer.Runtime (in Microsoft.CommerceServer.Runtime.dll)

Syntax

'Declaration
Public NotInheritable Class CommerceDirectMailerAuthenticationModule _
    Inherits CommerceModule
'Usage
Dim instance As CommerceDirectMailerAuthenticationModule
public sealed class CommerceDirectMailerAuthenticationModule : CommerceModule
public ref class CommerceDirectMailerAuthenticationModule sealed : public CommerceModule
public final class CommerceDirectMailerAuthenticationModule extends CommerceModule

Remarks

This class implements the following authentication functionality for Direct Mailer:

  • DM Authentication module decrypts the AuthTicket verifying it is a valid ticket. If there is no auth ticket, the module returns without any additional processing. This is done when the AuthenticateRequest event is fired.

  • If the auth ticket is present and it is not valid, an exception is thrown.

  • If the auth ticket is valid:

    • The Logon name is retrieved from the AuthTicket. A GenericPrincipal with GenericIdentity is created. During new() of the GenericIdentity the name is obtained by making a profile system call to obtain the User Id from the logon name. The settings for this call as per the CommerceServer/profiles section of the web.config. The type of the GenericIdentity is a custom string that represents a "DM Authentication Type". This also populates the CommerceContext.Current.UserID and UserProfile keys so that they are available to site code.

    • GenericPrincipal is attached to HttpContext.Current.User – this allows ASP.NET to recognize the authentication and reuse the object.

Inheritance Hierarchy

System..::.Object
  Microsoft.CommerceServer.Runtime..::.CommerceModule
    Microsoft.CommerceServer.Runtime..::.CommerceDirectMailerAuthenticationModule

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

CommerceDirectMailerAuthenticationModule Members

Microsoft.CommerceServer.Runtime Namespace