ClaimsPrincipalFactory.FromUsernamePassword(String, String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.