private void Setup()
 {
     var myClaim = new Claim("http://myclaims/customer", "add");
     var currentIdentity = new CorpIdentity("stevenh", myClaim);
     var principal = new ClaimsPrincipal(currentIdentity);
     Thread.CurrentPrincipal = principal;
 }
コード例 #2
0
 private void SetupCorpIdentity()
 {
     var currentIdentity = new CorpIdentity("stevenh", "big boss", "zurich", "developer");
     var principal = new ClaimsPrincipal(currentIdentity);
     Thread.CurrentPrincipal = principal;
 }