SPUser.RequireRequestToken 属性

Gets or sets a value that indicates whether the SPUser object requires a request token.

命名空间:  Microsoft.SharePoint
程序集:  Microsoft.SharePoint(位于 Microsoft.SharePoint.dll 中)

语法

声明
Public Property RequireRequestToken As Boolean
    Get
    Set
用法
Dim instance As SPUser
Dim value As Boolean

value = instance.RequireRequestToken

instance.RequireRequestToken = value
public bool RequireRequestToken { get; set; }

属性值

类型:System.Boolean
true if the SPUser object requires a request token; otherwise false.

备注

The RequireRequestToken property can be true only if the IsApplicationPrincipal property is true.

The practical effect of setting RequireRequestToken to true is that the application represented by the SPUser object must be hosted in a Web Part on a Microsoft SharePoint Foundation page to which a real user; that is, a user who is not an application principal; has navigated. The application can take actions and retrieve data only if both the real user and the application principal have permission for the action or data.

We recommend that RequireRequestToken be true whenever IsApplicationPrincipal is true. If it is not, then any person running the application would have all of the permissions of the application, even if that person does not have those permissions.

For more information on the role of the request token, see the links in the Related Topics section.

另请参阅

引用

SPUser 类

SPUser 成员

Microsoft.SharePoint 命名空间

SPExternalApplicationRequestProperties.RequestTokenPrefix

Microsoft.SharePoint.Client.ExternalApplicationRequestToken

ApplicationContext.RequestToken

ClientConstants.RequestTokenHeader

RequestForwarder.RequestToken

其他资源

How to: Create an Application Principal User

Lifecycle of a Silverlight Request to a Web Application