Developer forum

Forum » CMS - Standard features » Login failure log

Login failure log

Khaing May Thaw
Reply

Hi all,

 

Could you please someone advise me where can I check the User Login Failure Log?

 

We can limit the user login failure time, right, with the Extranet Login Limitation setting.

If the user login failed 3 times, the account will be blocked about the defined blocking period.

Can we able to check 'What is being shown in the back end that can tell that this user had to fail logged in more than 3 times'?

 

Best Regards,

May Thaw.

extranet_login_limitaiton.png

Replies

 
Nicolai Pedersen
Reply
This post has been marked as an answer

Hi May Thaw

You cannot see that in the backend. On the user you can see their last successful login, see dump.

You can create a notification subscriber to log all login attempts:

[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)
                //Log the login here;
        }
    }
Capture.JPG
Votes for this answer: 1
 
Khaing May Thaw
Reply

Dear Nicolai,

 

Thank you for your reply.

It makes me helpful.

 

Best Regards,

May Thaw.

 

You must be logged in to post in the forum