Partager via


ClaimsPrincipalFactory.FromUsernamePassword(String, String) Method

Definition

Instantiate a ClaimsPrincipal from a username and password. This can be used for ROPC flow for testing purposes.

public static System.Security.Claims.ClaimsPrincipal FromUsernamePassword (string username, string password);
static member FromUsernamePassword : string * string -> System.Security.Claims.ClaimsPrincipal
Public Shared Function FromUsernamePassword (username As String, password As String) As ClaimsPrincipal

Parameters

username
String

UPN of the user for example username@domain.

password
String

Password for the user.

Returns

A ClaimsPrincipal containing these two claims.

Applies to