ClaimsIdentity (Constructor, (Genérico IEnumerable, String, String, String, SecurityToken))
Initializes an instance of T:Microsoft.IdentityModel.Claims.ClaimsIdentity using an enumerated collection of T:Microsoft.IdentityModel.Claims.Claim objects and the specified authentication type, name claim type, and role claim type.
Espacio de nombres: Microsoft.IdentityModel.Claims
Ensamblado: Microsoft.IdentityModel (en microsoft.identitymodel.dll)
Uso
Dim claims As IEnumerable(Of Claim) Dim authenticationType As String Dim nameClaimType As String Dim roleClaimType As String Dim bootstrapToken As SecurityToken Dim instance As New ClaimsIdentity(claims, authenticationType, nameClaimType, roleClaimType, bootstrapToken)
Sintaxis
'Declaración
Public Sub New ( _
claims As IEnumerable(Of Claim), _
authenticationType As String, _
nameClaimType As String, _
roleClaimType As String, _
bootstrapToken As SecurityToken _
)
public ClaimsIdentity (
IEnumerable<Claim> claims,
string authenticationType,
string nameClaimType,
string roleClaimType,
SecurityToken bootstrapToken
)
public:
ClaimsIdentity (
IEnumerable<Claim^>^ claims,
String^ authenticationType,
String^ nameClaimType,
String^ roleClaimType,
SecurityToken^ bootstrapToken
)
public ClaimsIdentity (
IEnumerable<Claim> claims,
String authenticationType,
String nameClaimType,
String roleClaimType,
SecurityToken bootstrapToken
)
public function ClaimsIdentity (
claims : IEnumerable<Claim>,
authenticationType : String,
nameClaimType : String,
roleClaimType : String,
bootstrapToken : SecurityToken
)
Parámetros
- claims
The collection of Claim objects to populate the ClaimsIdentity with.
- authenticationType
The type of authentication used.
- nameClaimType
The claim type to use for P:Microsoft.IdentityModel.Claims.ClaimsIdentity.Name.
- roleClaimType
The claim type to use for IClaimsPrincipal.IsInRole(string role).
- bootstrapToken
The token originally used to create this identity.
Excepciones
Tipo de excepción | Condición |
---|
Notas
Plataformas
Plataformas de desarrollo
Windows Server 2003, Windows Vista
Target Platforms
Windows Server 2008, Windows Vista, Not tested on Windows XP
Vea también
Referencia
ClaimsIdentity (Clase)
ClaimsIdentity (Miembros)
Microsoft.IdentityModel.Claims (Espacio de nombres)