{"action":"closed","issue":{"url":"https://api.github.com/repos/IdentityServer/IdentityServer3.Samples/issues/302","repository_url":"https://api.github.com/repos/IdentityServer/IdentityServer3.Samples","labels_url":"https://api.github.com/repos/IdentityServer/IdentityServer3.Samples/issues/302/labels{/name}","comments_url":"https://api.github.com/repos/IdentityServer/IdentityServer3.Samples/issues/302/comments","events_url":"https://api.github.com/repos/IdentityServer/IdentityServer3.Samples/issues/302/events","html_url":"https://github.com/IdentityServer/IdentityServer3.Samples/issues/302","id":170823105,"number":302,"title":"I am getting clientId as null always from LocalAuthenticationContext ","user":{"login":"naveenkumarreddy","id":6703476,"avatar_url":"https://avatars.githubusercontent.com/u/6703476?v=3","gravatar_id":"","url":"https://api.github.com/users/naveenkumarreddy","html_url":"https://github.com/naveenkumarreddy","followers_url":"https://api.github.com/users/naveenkumarreddy/followers","following_url":"https://api.github.com/users/naveenkumarreddy/following{/other_user}","gists_url":"https://api.github.com/users/naveenkumarreddy/gists{/gist_id}","starred_url":"https://api.github.com/users/naveenkumarreddy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/naveenkumarreddy/subscriptions","organizations_url":"https://api.github.com/users/naveenkumarreddy/orgs","repos_url":"https://api.github.com/users/naveenkumarreddy/repos","events_url":"https://api.github.com/users/naveenkumarreddy/events{/privacy}","received_events_url":"https://api.github.com/users/naveenkumarreddy/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/IdentityServer/IdentityServer3.Samples/labels/question","name":"question","color":"cc317c"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2016-08-12T08:31:33Z","updated_at":"2016-08-12T19:20:38Z","closed_at":"2016-08-12T19:20:38Z","body":"I am trying to get the clientId at the time of login but I am always getting it null. do i need to pass the clientId any where so the I get it from context.SignInMessage .\r\n\r\npublic override Task AuthenticateLocalAsync(LocalAuthenticationContext context)\r\n        {\r\n            try\r\n            {\r\n                var test = context.SignInMessage.ClientId;\r\n                using (var pc = new PrincipalContext(ContextType.Domain, \"wordandbrown.com\"))\r\n                {\r\n                    if (pc.ValidateCredentials(context.UserName, context.Password))\r\n                    {\r\n                        using (var user = UserPrincipal.FindByIdentity(pc, IdentityType.SamAccountName, context.UserName))\r\n                        {\r\n                            if (user != null)\r\n                            {\r\n                                var nameClaim = new List<Claim> {new Claim(Constants.ClaimTypes.Name, context.UserName)};\r\n                                //var test  = Task.FromResult(new AuthenticateResult(subject: Guid.NewGuid().ToString(), name: context.UserName, claims:nameClaim));\r\n                                //return test;\r\n                                context.AuthenticateResult = new AuthenticateResult(Guid.NewGuid().ToString(),context.UserName,nameClaim);\r\n                                return Task.FromResult(0);\r\n                            }\r\n                        }\r\n                    }\r\n\r\n                    // The user name or password is incorrect\r\n                    return Task.FromResult<AuthenticateResult>(null);\r\n                }\r\n\r\n            }\r\n            catch\r\n            {\r\n                // Server error\r\n                return Task.FromResult<AuthenticateResult>(null);\r\n            }\r\n        }\r\n"}}
{"actor":{"display_login":"brockallen"}}