{"action":"opened","issue":{"url":"https://api.github.com/repos/IdentityServer/IdentityServer3/issues/1163","labels_url":"https://api.github.com/repos/IdentityServer/IdentityServer3/issues/1163/labels{/name}","comments_url":"https://api.github.com/repos/IdentityServer/IdentityServer3/issues/1163/comments","events_url":"https://api.github.com/repos/IdentityServer/IdentityServer3/issues/1163/events","html_url":"https://github.com/IdentityServer/IdentityServer3/issues/1163","id":67415318,"number":1163,"title":"Custom role provider","user":{"login":"rajarameshvarma","id":7087542,"avatar_url":"https://avatars.githubusercontent.com/u/7087542?v=3","gravatar_id":"","url":"https://api.github.com/users/rajarameshvarma","html_url":"https://github.com/rajarameshvarma","followers_url":"https://api.github.com/users/rajarameshvarma/followers","following_url":"https://api.github.com/users/rajarameshvarma/following{/other_user}","gists_url":"https://api.github.com/users/rajarameshvarma/gists{/gist_id}","starred_url":"https://api.github.com/users/rajarameshvarma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rajarameshvarma/subscriptions","organizations_url":"https://api.github.com/users/rajarameshvarma/orgs","repos_url":"https://api.github.com/users/rajarameshvarma/repos","events_url":"https://api.github.com/users/rajarameshvarma/events{/privacy}","received_events_url":"https://api.github.com/users/rajarameshvarma/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-04-09T17:48:13Z","updated_at":"2015-04-09T17:48:13Z","closed_at":null,"body":"How can I use Role provider with Identity Server. When I am trying to configure custom role provider, for all the methods, ex. public override string[] GetRolesForUser(string username), username is null.\r\n\r\nI tried to set User using below code.\r\n   UserPrincipal principal = new UserPrincipal(userName);\r\n   principal.Identity = new GenericIdentity(userName);\r\n   HttpContext.Current.User = principal;\r\n\r\nEven tried to convert it to ClaimsPrincipal but still no luck. I am setting this in SecurityTokenValidated method of OpenIdConnectAuthenticationNotifications.\r\n\r\nPlease help."}}