wif - How can i get the WindowsIdentity or WindowsPrincipal of a WCF Claim / SecurityIdentifier (SID)? -


I'm trying to get access to all users of the Administrators group through WCF.

  internal sealed class Authorization Manager: Services Authority Manager (public override bool Chekaaksis (Opreshnconteks operation Koranteks) {base.CheckAccess (operationContext); ReadOnlyCollection & LT; ClaimSet & gt; ClaimSets = operationContext.ServiceSecurityContext .AuthorizationContext.ClaimSets; claims claims Dawaset = claims set [0]; Foreach (claim claims claims claims. Fndaclaims (claim Taipksnket rights. identity)) {security identifier sid = (security identifier) ​​claims. Resources; Ante Sikount Antiakkwont = (Antisikount) Sid. Tronsselet (Taipf (Antisikount)); // this would be line throws an error How can I convert a WindowsIdentity a SecurityIdentifier /? WindowsIdentity user = new WindowsIdentity (NtAccountkValue); Windows principal principal = new Windows principal (user); return of principal. Introl (Vindojhbult Inrol. Admontr);}}}}  

authenticate you You will not have an identifier that recognizes an account, this account name ie SID: S-1-5-domain-500 & lt; => Isomorphic with the domain \ administrator. A WindowsIdentity is a user who has been certified.

That said, I think that users are trying to get you, he's already been authenticated and give his account claim Identification (SID). / P>


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -