Skip to content
This repository has been archived by the owner on Sep 18, 2021. It is now read-only.

Commit

Permalink
Updated TestOptionsFactory and embedded pfx loading to be WAWS compat…
Browse files Browse the repository at this point in the history
…ible
  • Loading branch information
leastprivilege committed Apr 14, 2014
1 parent 8d466fa commit d12a253
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
11 changes: 3 additions & 8 deletions source/Core.TestServices/TestCoreSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,16 @@ public class TestCoreSettings : ICoreSettings
private X509Certificate2 _certificate;
private string _publicHostAddress;

public TestCoreSettings(string issuerUri, string siteName, string certificateName, string publicHostAddress)
public TestCoreSettings(string issuerUri, string siteName, string publicHostAddress)
{
_issuerUri = issuerUri;
_siteName = siteName;
_publicHostAddress = publicHostAddress;

if (certificateName.IsMissing())
{
certificateName = "idsrv3test.pfx";
}

var assembly = this.GetType().Assembly;
using (var stream = assembly.GetManifestResourceStream("Thinktecture.IdentityServer.TestServices." + certificateName))
using (var stream = assembly.GetManifestResourceStream("Thinktecture.IdentityServer.TestServices.idsrv3test.pfx"))
{
_certificate = new X509Certificate2(ReadStream(stream));
_certificate = new X509Certificate2(ReadStream(stream), "idsrv3test");
}
}

Expand Down
6 changes: 3 additions & 3 deletions source/Core.TestServices/TestOptionsFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ namespace Thinktecture.IdentityServer.TestServices
{
public class TestOptionsFactory
{
public static IdentityServerServiceFactory Create(string issuerUri, string siteName, string certificateName = "", string publicHostAddress = "")
public static IdentityServerServiceFactory Create(string issuerUri, string siteName, string publicHostAddress = "")
{
var settings = new TestCoreSettings(issuerUri, siteName, certificateName, publicHostAddress);
var settings = new TestCoreSettings(issuerUri, siteName, publicHostAddress);
var codeStore = new TestAuthorizationCodeStore();
var tokenStore = new TestTokenHandleStore();
var consent = new TestConsentService();
var logger = new DebugLogger();
var logger = new TraceLogger();

var fact = new IdentityServerServiceFactory
{
Expand Down
Binary file modified source/Core.TestServices/idsrv3test.pfx
Binary file not shown.
7 changes: 6 additions & 1 deletion source/Host/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,15 @@ public void Configuration(IAppBuilder app)
{
app.Map("/core", coreApp =>
{
//var factory = TestOptionsFactory.Create(
// issuerUri: "https://idsrv3.com",
// siteName: "Thinktecture IdentityServer v3 - preview 1",
// publicHostAddress: "http://idsrv3.azurewebsites.net");
var factory = TestOptionsFactory.Create(
issuerUri: "https://idsrv3.com",
siteName: "Thinktecture IdentityServer v3 - preview 1",
publicHostAddress: "http://localhost:3333");
publicHostAddress: "http://localhost:3333/core");
//factory.UserService = Thinktecture.IdentityServer.MembershipReboot.UserServiceFactory.Factory;
//factory.UserService = Thinktecture.IdentityServer.AspNetIdentity.UserServiceFactory.Factory;
Expand Down

0 comments on commit d12a253

Please sign in to comment.