private static RequestSecurityTokenResponse RequestTokenInMemory(RequestSecurityToken rst) { var signingCert = X509Certificates.GetCertificateFromStore("CN=STS", StoreLocation.LocalMachine); var encryptingCert = X509Certificates.GetCertificateFromStore("CN=Service", StoreLocation.LocalMachine); var config = new InMemoryStsConfiguration(signingCert); var sts = new InMemorySts(config, encryptingCert); var id = new ClaimsIdentity(new List<Claim> { new Claim(ClaimTypes.Name, "dominick") }); return sts.Issue(ClaimsPrincipal.CreateFromIdentity(id), rst); }
private static RequestSecurityTokenResponse RequestTokenInMemory(RequestSecurityToken rst) { var signingCert = X509Certificates.GetCertificateFromStore("CN=STS", StoreLocation.LocalMachine); var encryptingCert = X509Certificates.GetCertificateFromStore("CN=Service", StoreLocation.LocalMachine); var config = new InMemoryStsConfiguration(signingCert); var sts = new InMemorySts(config, encryptingCert); var id = new ClaimsIdentity(new List <Claim> { new Claim(ClaimTypes.Name, "dominick") }); return(sts.Issue(ClaimsPrincipal.CreateFromIdentity(id), rst)); }