SPUserToken Constructor (IIdentity, Uri)
Initializes a new instance of the SPUserToken class based on the specified claims identity.
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No
Syntax
'Declaration
Public Sub New ( _
identity As IIdentity, _
contextUri As Uri _
)
'Usage
Dim identity As IIdentity
Dim contextUri As Uri
Dim instance As New SPUserToken(identity, _
contextUri)
public SPUserToken(
IIdentity identity,
Uri contextUri
)
Parameters
identity
Type: System.Security.Principal.IIdentityAn identity class instance that provides the claims identity.
contextUri
Type: System.UriAn object representation of a uniform resource identifier (URI) that points to the SPWebApplication where the user token will be used.
Remarks
The claims identity that is used to construct this object should match the output that a WindowsIdentity object would have had. Depending on whether the Web application uses Claims Authentication, the token may be generated differently.