SPClaimProvider.CreateClaim Method
Creates claims for the claims provider.
Namespace: Microsoft.SharePoint.Administration.Claims
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'Declaration
Protected Function CreateClaim ( _
claimType As String, _
value As String, _
valueType As String _
) As SPClaim
'Usage
Dim claimType As String
Dim value As String
Dim valueType As String
Dim returnValue As SPClaim
returnValue = Me.CreateClaim(claimType, _
value, valueType)
protected SPClaim CreateClaim(
string claimType,
string value,
string valueType
)
Parameters
claimType
Type: System.StringThe type of claim. Examples of claim types include first name, role and email address. The claim type provides context for the claim value, and it is usually expressed as a Uniform Resource Identifier (URI). For example, the e-mail address claim type is represented as https://schemas.microsoft.com/ws/2008/06/identity/claims/email.
value
Type: System.StringThe value of the claim. For example, if the claim type is role, a value might be contributor, and if the claim type is first name, a value might be Matt.
valueType
Type: System.StringThe type of value in the claim. These are all URIs that refer to a string. They often return values from ClaimValueTypes() but that is not required.
Return Value
Type: Microsoft.SharePoint.Administration.Claims.SPClaim
A SPClaim object.
Remarks
This method is a helper function often used within custom implementations of the FillClaimsForEntity() method to help you create SPClaim objects.