Partager via


AuthManager Object

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

Note

The AuthManager object is obsolete. You should use .NET Framework authentication instead.

Use this object to perform user identification and authentication and to manage user security information. This object also contains methods for browsing with and without cookies.

ProgID:

Commerce.AuthManager (Externally creatable)

COM Class Name:

MSCSAuthManager

Type Library Name:

Microsoft Commerce Server AuthManager 2.0 Type Library

DLL Name:

mscsauth.dll

Threading Model:

Both

COM Interface Name:

IMSCSAuthManager2

Interface ID Constant:

IID_IMSCSAuthManager

Header File:

MSCSAuth.h

Methods

Method

Description

GenerateEncryptionKey

Generates an encryption key for the administration of cookie data. Use this method in administrative or setup components only.

GetProperty

Retrieves the specified custom property stored in a cookie or query string.

GetURL

Generates a URL that contains optional name/value pairs.

GetUserID

Retrieves the unique ID for the current user.

GetUserIDFromCookie

Retrieves the user ID from a cookie.

GetUserIDFromCookieAndKey

Retrieves the user ID from a cookie and the encryption key.

Initialize

Initializes the AuthManager object by caching all the required site configuration resource properties.

IsAuthenticated

Indicates whether a user is currently authenticated.

Refresh

Updates the cached site configuration resource properties after one or more of the properties have been changed.

SetAuthTicket

Generates an encrypted MSCSAuth ticket for a registered user.

SetProfileTicket

Generates an encrypted MSCSProfile ticket for an anonymous user.

SetProperty

Adds a property/value pair to a cookie or query string that contains a ticket.

SetUserID

Sets the user ID property on a ticket.

UnInitialize

Removes the site-specific configuration resource properties from the cache.

URLShopperArgs

Generates an encoded URL query string of name/value pairs and append the ticket to the query string if a ticket is set.

Remarks

The AuthManager object is primarily intended to be used through ASP script. However, the following methods are available in C++ through the IMSCSAuthManager interface when the MSCSAuthManager object is instantiated outside an ASP script: GenerateEncryptionKey, GetUserIDFromCookie, GetUserIDFromCookieAndKey, Initialize, Refresh, and UnInitialize.

As soon as any AuthManager object instance has been successfully initialized inside an ASP or ASP.NET site, any additional instances of the AuthManager object initialized within that site use the cached resources as loaded by the first call to the Initialize method. Therefore, even if a different value for the SiteName parameter is used, the AuthManager object will still be configured to run using the site configuration specified in the first call to the Initialize method. In other words, within a single ASP or ASP.NET site that you can run an AuthManager object against the resource configuration of a single site but never multiple sites.

See Also

Other Resources

COM Object Reference