示例#1
0
 public ManageExternalLogin(HttpClient client, IHtmlDocument externalLoginDocument, DefaultUIContext context)
     : base(client, externalLoginDocument, context)
 {
     _externalLoginForm = HtmlAssert.HasForm("#external-login", externalLoginDocument);
 }
示例#2
0
        public ExternalLogins(HttpClient client, IHtmlDocument externalLoginDocument, DefaultUIContext context)
            : base(client, externalLoginDocument, context)
        {
            if (context.SocialLoginProvider != null && context.PasswordLoginEnabled)
            {
                RemoveExternalLogin = HtmlAssert.HasForm("#remove-login-Contoso", Document);
            }

            if (context.SocialLoginProvider != null)
            {
                ExternalLoginDisplayName = HtmlAssert.HasElement("#login-provider-Contoso", Document);
            }
        }
示例#3
0
        public static async Task <ConfirmEmail> Create(IHtmlAnchorElement link, HttpClient client, DefaultUIContext context)
        {
            var response = await client.GetAsync(link.Href);

            var confirmEmail = await ResponseAssert.IsHtmlDocumentAsync(response);

            return(new ConfirmEmail(client, confirmEmail, context));
        }
示例#4
0
 public DefaultUIContext(DefaultUIContext currentContext) : base(currentContext)
 {
 }
示例#5
0
 public LinkExternalLogin(HttpClient client, IHtmlDocument externalLoginsDocument, DefaultUIContext context)
     : base(client, externalLoginsDocument, context)
 {
     _linkLoginForm   = HtmlAssert.HasForm($"#link-login-form", externalLoginsDocument);
     _linkLoginButton = HtmlAssert.HasElement($"#link-login-button-Contoso", externalLoginsDocument);
 }
示例#6
0
 public ResendEmailConfirmation(HttpClient client, IHtmlDocument document, DefaultUIContext context) : base(client, document, context)
 {
     _resendForm = HtmlAssert.HasForm(document);
 }
示例#7
0
 public ShowRecoveryCodes(HttpClient client, IHtmlDocument showRecoveryCodes, DefaultUIContext context)
     : base(client, showRecoveryCodes, context)
 {
     _recoveryCodeElements = HtmlAssert.HasElements(".recovery-code", showRecoveryCodes);
     Context.RecoveryCodes = Codes.ToArray();
 }
示例#8
0
 public DeleteUser(HttpClient client, IHtmlDocument deleteUser, DefaultUIContext context)
     : base(client, deleteUser, context)
 {
     _deleteForm = HtmlAssert.HasForm("#delete-user", deleteUser);
 }
示例#9
0
 public ForgotPasswordConfirmation(HttpClient client, IHtmlDocument document, DefaultUIContext context) : base(client, document, context)
 {
 }
示例#10
0
 public Login(HttpClient client, IHtmlDocument login, DefaultUIContext context)
     : base(client, login, context)
 {
     _loginForm = HtmlAssert.HasForm(login);
 }
示例#11
0
 public ExternalLogins(HttpClient client, IHtmlDocument externalLoginDocument, DefaultUIContext context)
     : base(client, externalLoginDocument, context)
 {
 }
示例#12
0
 public SetPassword(HttpClient client, IHtmlDocument setPassword, DefaultUIContext context)
     : base(client, setPassword, context)
 {
     _setPasswordForm = HtmlAssert.HasForm("#set-password-form", setPassword);
 }
 public ResetPasswordConfirmation(HttpClient client, IHtmlDocument resetPasswordConfirmation, DefaultUIContext context)
     : base(client, resetPasswordConfirmation, context)
 {
 }
示例#14
0
 public ResetPassword(HttpClient client, IHtmlDocument resetPassword, DefaultUIContext context) : base(client, resetPassword, context)
 {
     _resetPasswordForm = HtmlAssert.HasForm(resetPassword);
 }
示例#15
0
 public Register(HttpClient client, IHtmlDocument register, DefaultUIContext context)
     : base(client, register, context)
 {
     _registerForm = HtmlAssert.HasForm(register);
 }
示例#16
0
        internal static async Task <ResetPassword> CreateAsync(IHtmlAnchorElement link, HttpClient client, DefaultUIContext context)
        {
            var resetPasswordResponse = await client.GetAsync(link.Href);

            var resetPassword = await ResponseAssert.IsHtmlDocumentAsync(resetPasswordResponse);

            return(new ResetPassword(client, resetPassword, context));
        }
示例#17
0
 public ChangePassword(HttpClient client, IHtmlDocument changePassword, DefaultUIContext context)
     : base(client, changePassword, context)
 {
     _changePasswordForm = HtmlAssert.HasForm("#change-password-form", changePassword);
 }
示例#18
0
 public RemoveExternalLogin(HttpClient client, IHtmlDocument externalLogin, DefaultUIContext context)
     : base(client, externalLogin, context)
 {
     _removeLoginForm = HtmlAssert.HasForm($"#remove-login-Contoso", externalLogin);
 }
示例#19
0
 public LoginWith2fa(HttpClient client, IHtmlDocument loginWithTwoFactor, DefaultUIContext context)
     : base(client, loginWithTwoFactor, context)
 {
     _twoFactorForm             = HtmlAssert.HasForm(loginWithTwoFactor);
     _loginWithRecoveryCodeLink = HtmlAssert.HasLink("#recovery-code-login", loginWithTwoFactor);
 }
示例#20
0
 public PersonalData(HttpClient client, IHtmlDocument personalData, DefaultUIContext context)
     : base(client, personalData, context)
 {
     _deleteLink   = HtmlAssert.HasLink("#delete", personalData);
     _downloadForm = HtmlAssert.HasForm("#download-data", personalData);
 }
示例#21
0
 public ForgotPassword(HttpClient client, IHtmlDocument document, DefaultUIContext context) : base(client, document, context)
 {
     _forgotPasswordForm = HtmlAssert.HasForm(document);
 }
示例#22
0
 public LoginWithRecoveryCode(HttpClient client, IHtmlDocument loginWithRecoveryCode, DefaultUIContext context)
     : base(client, loginWithRecoveryCode, context)
 {
     _loginWithRecoveryCodeForm = HtmlAssert.HasForm(loginWithRecoveryCode);
 }
示例#23
0
 public ConfirmEmail(
     HttpClient client,
     IHtmlDocument document,
     DefaultUIContext context) : base(client, document, context)
 {
 }