Table of Contents

Class Standard.User.OnExtranetLoginFailedArgs

Namespace
Dynamicweb.Notifications
Assembly
Dynamicweb.dll
Provides information if authorization failed
public class Standard.User.OnExtranetLoginFailedArgs : NotificationArgs
Inheritance
Standard.User.OnExtranetLoginFailedArgs
Inherited Members

Examples

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");
        }
    }
}

Remarks

Constructors

OnExtranetLoginFailedArgs()

Default constructor.
public OnExtranetLoginFailedArgs()

Remarks

This constructor is not used.

Properties

FailedReason

Gets or sets the reason.
public LogOnFailedReason FailedReason { get; set; }

Property Value

LogOnFailedReason
The reason.

Password

The password specified for login
public string Password { get; set; }

Property Value

string

Reason

Gets or sets the reason.
[Obsolete("Use FailedReason instead.")]
public Standard.User.OnExtranetLoginFailedArgs.FailReason Reason { get; set; }

Property Value

Standard.User.OnExtranetLoginFailedArgs.FailReason
The reason.

Username

The username specified for login
public string Username { get; set; }

Property Value

string
To top