Click or drag to resize

StandardUserOnExtranetLoginFailedArgs Class

Provides information if authorization failed
Inheritance Hierarchy
SystemObject
  Dynamicweb.Extensibility.NotificationsNotificationArgs
    Dynamicweb.NotificationsStandardUserOnExtranetLoginFailedArgs

Namespace:  Dynamicweb.Notifications
Assembly:  Dynamicweb (in Dynamicweb.dll) Version: 9.10.0
Syntax
public class OnExtranetLoginFailedArgs : NotificationArgs

The StandardUserOnExtranetLoginFailedArgs type exposes the following members.

Constructors
Properties
  NameDescription
Public propertyFailedReason
Gets or sets the reason.
Public propertyPassword
The password specified for login
Public propertyReason Obsolete.
Gets or sets the reason.
Public propertyUsername
The username specified for login
Top
Remarks
Examples
C#
using Dynamicweb.Security.UserManagement;
using System;

namespace Dynamicweb.Examples.Notifications.Standard
{
    [Dynamicweb.Extensibility.Notifications.Subscribe(Dynamicweb.Notifications.Standard.User.OnExtranetLoginFailed)]
    public class OnExtranetLogOnFailedObserver : Dynamicweb.Extensibility.Notifications.NotificationSubscriber
    {
        public override void OnNotify(string notification, Dynamicweb.Extensibility.Notifications.NotificationArgs args)
        {
            if (args == null)
                return;

            if (!(args is Dynamicweb.Notifications.Standard.User.OnExtranetLoginFailedArgs))
                return;

            Dynamicweb.Notifications.Standard.User.OnExtranetLoginFailedArgs item = (Dynamicweb.Notifications.Standard.User.OnExtranetLoginFailedArgs)args;
            //Throw exception if login is incorrect
            if(item.FailedReason == LogOnFailedReason.IncorrectLogin)
                throw new Exception("Incorrect login");
        }
    }
}
See Also