public static string GetUserNameLocalizationKey(LoginResolutionPolicy policy) { switch (policy) { case LoginResolutionPolicy.Username: return("Username"); case LoginResolutionPolicy.Email: return("Email"); default: return("Username"); } }
public UserResolver(UserManager <TUser> userManager, LoginConfiguration configuration) { _userManager = userManager; _policy = configuration.ResolutionPolicy; }