Partager via


NonAuthenticatedIdentity Constructor (String, String)

Initializes a new instance of the NonAuthenticatedIdentity class representing the user with the specified name and authentication type.

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

Syntax

'Declaration
Public Sub New ( _
    name As String, _
    type As String _
)
'Usage
Dim name As String
Dim type As String

Dim instance As New NonAuthenticatedIdentity(name, type)
public NonAuthenticatedIdentity(
    string name,
    string type
)
public:
NonAuthenticatedIdentity(
    String^ name, 
    String^ type
)
public function NonAuthenticatedIdentity(
    name : String, 
    type : String
)

Parameters

  • name
    Type: System..::.String
    The name of the user on whose behalf the code is running.

Exceptions

Exception Condition
ArgumentNullException

name or type is nullNothingnullptra null reference (Nothing in Visual Basic).

Remarks

The most common use case is when a returning user is recognized by a cookie. The site will want to hide sensitive information from the user in case the computer is being used by someone else. The site can ask for a password from the user before displaying sensitive information.

This allows a site to recognize a user without treating the user as authenticated. The most common use case is when a returning user is recognized by a cookie. The site will want to hide sensitive information from the user in case the computer is being used by someone else. The site can ask for a password from the user before displaying sensitive information.

Permissions

See Also

Reference

NonAuthenticatedIdentity Class

NonAuthenticatedIdentity Members

NonAuthenticatedIdentity Overload

Microsoft.CommerceServer.Runtime Namespace