SPSecurityContext.SecurityTokenForFormsAuthentication - Méthode (Uri, String, String, String, String)
Remarque : cette API est désormais obsolète.
Obtient un jeton de sécurité d'un utilisateur par le biais de l'authentification basée sur les formulaires d'authentification.
Espace de noms : Microsoft.SharePoint
Assembly : Microsoft.SharePoint (dans Microsoft.SharePoint.dll)
Syntaxe
'Déclaration
<ObsoleteAttribute("Please SecurityTokenForFormsAuthentication(Uri context, String membershipProviderName, String roleProviderName, String username, String password, SPFormsAuthenticationOption options) instead.", _
False)> _
Public Shared Function SecurityTokenForFormsAuthentication ( _
context As Uri, _
membershipProviderName As String, _
roleProviderName As String, _
username As String, _
password As String _
) As SecurityToken
'Utilisation
Dim context As Uri
Dim membershipProviderName As String
Dim roleProviderName As String
Dim username As String
Dim password As String
Dim returnValue As SecurityToken
returnValue = SPSecurityContext.SecurityTokenForFormsAuthentication(context, _
membershipProviderName, roleProviderName, _
username, password)
[ObsoleteAttribute("Please SecurityTokenForFormsAuthentication(Uri context, String membershipProviderName, String roleProviderName, String username, String password, SPFormsAuthenticationOption options) instead.",
false)]
public static SecurityToken SecurityTokenForFormsAuthentication(
Uri context,
string membershipProviderName,
string roleProviderName,
string username,
string password
)
Paramètres
context
Type : System.UriUne URL de contexte qui pointe vers un objet SPWebApplication .
membershipProviderName
Type : System.StringLe nom d'un MembershipProvider inscrit pour le SPWebApplication.
roleProviderName
Type : System.StringLe nom d'un RoleProvider inscrit pour le SPWebApplication.
username
Type : System.StringLe nom d'utilisateur à utiliser avec la méthode ValidateUser() .
password
Type : System.StringLe mot de passe à utiliser avec MembershipProvider.ValidateUser.
Valeur renvoyée
Type : System.IdentityModel.Tokens.SecurityToken
Un jeton de sécurité.