Méthode ClaimsPrincipal.CreateFromIdentity (IIdentity, String)
Creates the appropriate implementation of an IClaimsPrincipal base on the type of the specified IIdentity (e.g. WindowsClaimsPrincipal for a WindowsIdentity). Note the appropriate IClaimsIdentity is generated based on the specified IIdentity as well.
Espace de noms: Microsoft.IdentityModel.Claims
Assembly : Microsoft.IdentityModel (dans microsoft.identitymodel.dll)
Utilisation
Dim identity As IIdentity Dim windowsIssuerName As String Dim returnValue As IClaimsPrincipal returnValue = ClaimsPrincipal.CreateFromIdentity(identity, windowsIssuerName)
Syntaxe
'Déclaration
Public Shared Function CreateFromIdentity ( _
identity As IIdentity, _
windowsIssuerName As String _
) As IClaimsPrincipal
public static IClaimsPrincipal CreateFromIdentity (
IIdentity identity,
string windowsIssuerName
)
public:
static IClaimsPrincipal^ CreateFromIdentity (
IIdentity^ identity,
String^ windowsIssuerName
)
public static IClaimsPrincipal CreateFromIdentity (
IIdentity identity,
String windowsIssuerName
)
public static function CreateFromIdentity (
identity : IIdentity,
windowsIssuerName : String
) : IClaimsPrincipal
Paramètres
- identity
An implementation of IIdentity.
- windowsIssuerName
The issuer name to use for Windows claims.
Valeur de retour
A claims-based principal.
Exceptions
Type d'exception | Condition |
---|
Cohérence de thread
Tous les membres statiques publics (partagés dans Visual Basic) de ce type sont thread-safe.Il n'est pas garanti que les membres d'instance soient thread-safe.
Plateformes
Plateformes de développement
Windows Server 2003, Windows Vista
Target Platforms
Windows Server 2008, Windows Vista, Not tested on Windows XP
Voir aussi
Référence
Classe ClaimsPrincipal
Membres ClaimsPrincipal
Espace de noms Microsoft.IdentityModel.Claims