Skip to content
This repository has been archived by the owner on Oct 19, 2022. It is now read-only.

Commit

Permalink
Add ConfigurationFileRoot
Browse files Browse the repository at this point in the history
  • Loading branch information
nbarbettini committed Jun 29, 2016
1 parent e47063e commit 7997143
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/Stormpath.Owin.Abstractions/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"xmlDoc": true
},
"dependencies": {
"Stormpath.Configuration.Abstractions": "5.2.0"
"Stormpath.Configuration.Abstractions": "5.3.0"
},
"description": "Common components (views, view models) for the Stormpath OWIN middleware library.",
"frameworks": {
Expand All @@ -33,5 +33,5 @@
"tooling": {
"defaultNamespace": "Stormpath.Owin.Abstractions"
},
"version": "1.1.0"
"version": "1.2.0"
}
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public static StormpathMiddleware Create(StormpathOwinOptions options)
IFrameworkUserAgentBuilder userAgentBuilder = new DefaultFrameworkUserAgentBuilder(options.LibraryUserAgent);

// Initialize and warm up SDK
var clientFactory = InitializeClient(options.Configuration);
var clientFactory = InitializeClient(options.Configuration, options.ConfigurationFileRoot);

// Scope a client for our resolution steps below
var client = clientFactory.Create(new ScopedClientOptions()
Expand All @@ -76,7 +76,7 @@ public static StormpathMiddleware Create(StormpathOwinOptions options)
return new StormpathMiddleware(options.ViewRenderer, options.Logger, userAgentBuilder, clientFactory, integrationConfiguration);
}

private static IScopedClientFactory InitializeClient(object initialConfiguration)
private static IScopedClientFactory InitializeClient(object initialConfiguration, string configurationFileRoot)
{
// Construct base client
var baseClient = Clients.Builder()
Expand All @@ -87,6 +87,7 @@ private static IScopedClientFactory InitializeClient(object initialConfiguration
#endif
.SetSerializer(Serializers.Create().JsonNetSerializer())
.SetConfiguration(initialConfiguration)
.SetConfigurationFileRoot(configurationFileRoot)
.Build();

// Attempt to connect and prime the cache with ITenant
Expand Down
2 changes: 2 additions & 0 deletions src/Stormpath.Owin.Middleware/StormpathOwinOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ public sealed class StormpathOwinOptions
{
public object Configuration { get; set; }

public string ConfigurationFileRoot { get; set; }

public ILogger Logger { get; set; }

public string LibraryUserAgent { get; set; }
Expand Down
7 changes: 3 additions & 4 deletions src/Stormpath.Owin.Middleware/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,11 @@
},
"copyright": "(c) 2016 Stormpath, Inc.",
"dependencies": {
"Stormpath.Configuration.Abstractions": "5.2.0",
"Stormpath.Owin.Abstractions": {
"target": "project",
"version": "1.1.0"
"version": "1.2.0"
},
"Stormpath.SDK": "0.91.0"
"Stormpath.SDK": "0.92.0"
},
"description": "Stormpath OWIN middleware for .NET.",
"frameworks": {
Expand Down Expand Up @@ -45,5 +44,5 @@
"tooling": {
"defaultNamespace": "Stormpath.Owin.Middleware"
},
"version": "1.1.0"
"version": "1.2.0"
}

0 comments on commit 7997143

Please sign in to comment.