{"action":"created","issue":{"url":"https://api.github.com/repos/IdentityServer/IdentityServer3/issues/1559","labels_url":"https://api.github.com/repos/IdentityServer/IdentityServer3/issues/1559/labels{/name}","comments_url":"https://api.github.com/repos/IdentityServer/IdentityServer3/issues/1559/comments","events_url":"https://api.github.com/repos/IdentityServer/IdentityServer3/issues/1559/events","html_url":"https://github.com/IdentityServer/IdentityServer3/issues/1559","id":92393459,"number":1559,"title":"Failed Authentication notification","user":{"login":"paddyhamilton","id":1984874,"avatar_url":"https://avatars.githubusercontent.com/u/1984874?v=3","gravatar_id":"","url":"https://api.github.com/users/paddyhamilton","html_url":"https://github.com/paddyhamilton","followers_url":"https://api.github.com/users/paddyhamilton/followers","following_url":"https://api.github.com/users/paddyhamilton/following{/other_user}","gists_url":"https://api.github.com/users/paddyhamilton/gists{/gist_id}","starred_url":"https://api.github.com/users/paddyhamilton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paddyhamilton/subscriptions","organizations_url":"https://api.github.com/users/paddyhamilton/orgs","repos_url":"https://api.github.com/users/paddyhamilton/repos","events_url":"https://api.github.com/users/paddyhamilton/events{/privacy}","received_events_url":"https://api.github.com/users/paddyhamilton/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/IdentityServer/IdentityServer3/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-07-01T14:03:43Z","updated_at":"2015-07-01T15:35:50Z","closed_at":null,"body":"I am looking to leverage a successful or failed authentication in my client app.  I can do this easily with successful authentication through the SecurityTokenValidated in the OpenIdConnectAuthenticationNotifications but I cant seem to be able to hit the AuthenticationFailed.  I am authenticating users through the AuthenticateLocalAsync method in IDS.  \r\nIs it possible for the client to get notified of a failed login attempt or will I need to do this in my AuthenticateLocalAsync method?\r\n"},"comment":{"url":"https://api.github.com/repos/IdentityServer/IdentityServer3/issues/comments/117718194","html_url":"https://github.com/IdentityServer/IdentityServer3/issues/1559#issuecomment-117718194","issue_url":"https://api.github.com/repos/IdentityServer/IdentityServer3/issues/1559","id":117718194,"user":{"login":"paddyhamilton","id":1984874,"avatar_url":"https://avatars.githubusercontent.com/u/1984874?v=3","gravatar_id":"","url":"https://api.github.com/users/paddyhamilton","html_url":"https://github.com/paddyhamilton","followers_url":"https://api.github.com/users/paddyhamilton/followers","following_url":"https://api.github.com/users/paddyhamilton/following{/other_user}","gists_url":"https://api.github.com/users/paddyhamilton/gists{/gist_id}","starred_url":"https://api.github.com/users/paddyhamilton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paddyhamilton/subscriptions","organizations_url":"https://api.github.com/users/paddyhamilton/orgs","repos_url":"https://api.github.com/users/paddyhamilton/repos","events_url":"https://api.github.com/users/paddyhamilton/events{/privacy}","received_events_url":"https://api.github.com/users/paddyhamilton/received_events","type":"User","site_admin":false},"created_at":"2015-07-01T15:35:50Z","updated_at":"2015-07-01T15:35:50Z","body":"No problem.  If it helps we have IDS set up as a website and our client is a website.  We have Owin middleware configured on the client to redirect users to Identity Server where the user can logon with an external provider (ADFS) or with a local login which is their specific credentials for the application.  If authenticated we intercept the info coming back (this is in our Client) in the Owin middleware SecurityTokenValidated method and add the claims and other info returned to an AuthenticationTicket.\r\n\r\nIts in this method where I know that the authentication has been successful.  The problem arises when the login fails on IdentityServer I have no way in the client to know this.  I thought the AuthenticationFailed method on the Owin Middleware in the Client would notify me of a failed login from IDS and I could log it from there.  The reason I want to log it from the Client app is that users need locked out if they have more that 5 failed login attempts and currently all our management is in the app.\r\n\r\nIf my explanation is confusing don't worry about it and Ill close the issue :-)"}}