diff --git a/src/Stormpath.Configuration.Abstractions/Default.cs b/src/Stormpath.Configuration.Abstractions/Default.cs index 7f7f9a0..a7471e0 100644 --- a/src/Stormpath.Configuration.Abstractions/Default.cs +++ b/src/Stormpath.Configuration.Abstractions/Default.cs @@ -301,12 +301,6 @@ public static class Default Uri = "/me", }, - Spa = new WebSpaConfiguration() - { - Enabled = false, - View = "index", - }, - Unauthorized = new WebUnauthorizedConfiguration() { View = "unauthorized", diff --git a/src/Stormpath.Configuration.Abstractions/Model/WebConfiguration.cs b/src/Stormpath.Configuration.Abstractions/Model/WebConfiguration.cs index 137a4b6..4e7755c 100644 --- a/src/Stormpath.Configuration.Abstractions/Model/WebConfiguration.cs +++ b/src/Stormpath.Configuration.Abstractions/Model/WebConfiguration.cs @@ -40,7 +40,6 @@ public WebConfiguration( WebIdSiteRouteConfiguration idSiteRoute = null, IDictionary social = null, WebMeRouteConfiguration meRoute = null, - WebSpaConfiguration spa = null, WebUnauthorizedConfiguration unauthorizedRoute = null) { this.BasePath = basePath ?? Default.Configuration.Web.BasePath; @@ -57,7 +56,6 @@ public WebConfiguration( this.IdSite = new WebIdSiteRouteConfiguration(idSiteRoute ?? Default.Configuration.Web.IdSite); this.Social = new Dictionary(social ?? Default.Configuration.Web.Social.ToDictionary(), StringComparer.OrdinalIgnoreCase); this.Me = new WebMeRouteConfiguration(meRoute ?? Default.Configuration.Web.Me); - this.Spa = new WebSpaConfiguration(spa ?? Default.Configuration.Web.Spa); this.Unauthorized = new WebUnauthorizedConfiguration(unauthorizedRoute ?? Default.Configuration.Web.Unauthorized); } @@ -76,7 +74,6 @@ public WebConfiguration(WebConfiguration existing) existing?.IdSite, existing?.Social.ToDictionary(), existing?.Me, - existing?.Spa, existing?.Unauthorized) { } @@ -169,12 +166,6 @@ internal WebConfiguration() /// Configuration path: stormpath.web.me public WebMeRouteConfiguration Me { get; internal set; } - /// - /// The Single-Page Application configuration. - /// - /// Configuration path: stormpath.web.spa - public WebSpaConfiguration Spa { get; internal set; } - /// /// The Unauthorized route configuration. /// diff --git a/src/Stormpath.Configuration.Abstractions/Model/WebCookieConfiguration.cs b/src/Stormpath.Configuration.Abstractions/Model/WebCookieConfiguration.cs index 93aadde..5ae1cd4 100644 --- a/src/Stormpath.Configuration.Abstractions/Model/WebCookieConfiguration.cs +++ b/src/Stormpath.Configuration.Abstractions/Model/WebCookieConfiguration.cs @@ -23,7 +23,7 @@ public sealed class WebCookieConfiguration { public WebCookieConfiguration( string name, - bool? httpOnly, + bool httpOnly, bool? secure, string path, string domain) @@ -37,7 +37,7 @@ public WebCookieConfiguration( public WebCookieConfiguration(WebCookieConfiguration existing) : this(name: existing?.Name, - httpOnly: existing?.HttpOnly, + httpOnly: existing?.HttpOnly ?? true, secure: existing?.Secure, path: existing?.Path, domain: existing?.Domain) @@ -58,7 +58,7 @@ internal WebCookieConfiguration() /// The cookie's HttpOnlyflag. /// /// Configuration path: stormpath.web.[*Cookie].httpOnly - public bool? HttpOnly { get; internal set; } + public bool HttpOnly { get; internal set; } /// /// The cookie's Secure flag. diff --git a/src/Stormpath.Configuration.Abstractions/Model/WebIdSiteRouteConfiguration.cs b/src/Stormpath.Configuration.Abstractions/Model/WebIdSiteRouteConfiguration.cs index cf36ab3..8bcdff6 100644 --- a/src/Stormpath.Configuration.Abstractions/Model/WebIdSiteRouteConfiguration.cs +++ b/src/Stormpath.Configuration.Abstractions/Model/WebIdSiteRouteConfiguration.cs @@ -79,7 +79,7 @@ internal WebIdSiteRouteConfiguration() /// Determines whether ID Site is used for login, registration, and password reset. /// /// Configuration path: stormpath.web.idSite.enabled - public bool? Enabled { get; internal set; } + public bool Enabled { get; internal set; } /// /// The URI for this route, or to use the default URI. diff --git a/src/Stormpath.Configuration.Abstractions/Model/WebLoginRouteConfiguration.cs b/src/Stormpath.Configuration.Abstractions/Model/WebLoginRouteConfiguration.cs index c2f25c1..3215c00 100644 --- a/src/Stormpath.Configuration.Abstractions/Model/WebLoginRouteConfiguration.cs +++ b/src/Stormpath.Configuration.Abstractions/Model/WebLoginRouteConfiguration.cs @@ -71,7 +71,7 @@ internal WebLoginRouteConfiguration() /// Determines whether the Login route is enabled. /// /// Configuration path: stormpath.web.login.enabled - public bool? Enabled { get; internal set; } + public bool Enabled { get; internal set; } /// /// The URI for this route, or to use the default URI. diff --git a/src/Stormpath.Configuration.Abstractions/Model/WebLogoutRouteConfiguration.cs b/src/Stormpath.Configuration.Abstractions/Model/WebLogoutRouteConfiguration.cs index ab93248..1709556 100644 --- a/src/Stormpath.Configuration.Abstractions/Model/WebLogoutRouteConfiguration.cs +++ b/src/Stormpath.Configuration.Abstractions/Model/WebLogoutRouteConfiguration.cs @@ -52,7 +52,7 @@ internal WebLogoutRouteConfiguration() /// Determines whether the Logout route is enabled. /// /// Configuration path: stormpath.web.logout.enabled - public bool? Enabled { get; internal set; } + public bool Enabled { get; internal set; } /// /// The URI for this route, or to use the default URI. diff --git a/src/Stormpath.Configuration.Abstractions/Model/WebMeRouteConfiguration.cs b/src/Stormpath.Configuration.Abstractions/Model/WebMeRouteConfiguration.cs index 0901e1b..bf313ad 100644 --- a/src/Stormpath.Configuration.Abstractions/Model/WebMeRouteConfiguration.cs +++ b/src/Stormpath.Configuration.Abstractions/Model/WebMeRouteConfiguration.cs @@ -55,7 +55,7 @@ internal WebMeRouteConfiguration() /// Determines whether the Me route is enabled. /// /// Configuration path: stormpath.web.me.enabled - public bool? Enabled { get; internal set; } + public bool Enabled { get; internal set; } /// /// The URI for this route, or to use the default URI. diff --git a/src/Stormpath.Configuration.Abstractions/Model/WebOauth2ClientCredentialsGrantConfiguration.cs b/src/Stormpath.Configuration.Abstractions/Model/WebOauth2ClientCredentialsGrantConfiguration.cs index 485d9cc..8309ae2 100644 --- a/src/Stormpath.Configuration.Abstractions/Model/WebOauth2ClientCredentialsGrantConfiguration.cs +++ b/src/Stormpath.Configuration.Abstractions/Model/WebOauth2ClientCredentialsGrantConfiguration.cs @@ -43,7 +43,7 @@ internal WebOauth2ClientCredentialsGrantConfiguration() /// Determines whether the client_credentials grant type is enabled. /// /// Configuration path: stormpath.web.oauth2.client_credentials.enabled - public bool? Enabled { get; internal set; } + public bool Enabled { get; internal set; } /// /// The Access Token configuration options. diff --git a/src/Stormpath.Configuration.Abstractions/Model/WebOauth2PasswordGrantConfiguration.cs b/src/Stormpath.Configuration.Abstractions/Model/WebOauth2PasswordGrantConfiguration.cs index c7cfe15..49e4519 100644 --- a/src/Stormpath.Configuration.Abstractions/Model/WebOauth2PasswordGrantConfiguration.cs +++ b/src/Stormpath.Configuration.Abstractions/Model/WebOauth2PasswordGrantConfiguration.cs @@ -43,7 +43,7 @@ internal WebOauth2PasswordGrantConfiguration() /// Determines whether the password grant type is enabled. /// /// Configuration path: stormpath.web.oauth2.password.enabled - public bool? Enabled { get; internal set; } + public bool Enabled { get; internal set; } /// /// The selected validation strategy. diff --git a/src/Stormpath.Configuration.Abstractions/Model/WebOauth2RouteConfiguration.cs b/src/Stormpath.Configuration.Abstractions/Model/WebOauth2RouteConfiguration.cs index fff6e2e..21163ba 100644 --- a/src/Stormpath.Configuration.Abstractions/Model/WebOauth2RouteConfiguration.cs +++ b/src/Stormpath.Configuration.Abstractions/Model/WebOauth2RouteConfiguration.cs @@ -61,7 +61,7 @@ internal WebOauth2RouteConfiguration() /// Determines whether the route is enabled. /// /// Configuration path: stormpath.web.oauth2.enabled - public bool? Enabled { get; internal set; } + public bool Enabled { get; internal set; } /// /// The URI for this route, or to use the default URI. diff --git a/src/Stormpath.Configuration.Abstractions/Model/WebRegisterRouteConfiguration.cs b/src/Stormpath.Configuration.Abstractions/Model/WebRegisterRouteConfiguration.cs index 8b1be8d..3e1f2ff 100644 --- a/src/Stormpath.Configuration.Abstractions/Model/WebRegisterRouteConfiguration.cs +++ b/src/Stormpath.Configuration.Abstractions/Model/WebRegisterRouteConfiguration.cs @@ -85,7 +85,7 @@ internal WebRegisterRouteConfiguration() /// Determines whether the Register route is enabled. /// /// Configuration path: stormpath.web.register.enabled - public bool? Enabled { get; internal set; } + public bool Enabled { get; internal set; } /// /// The URI for this route, or to use the default URI. diff --git a/src/Stormpath.Configuration.Abstractions/Model/WebSpaConfiguration.cs b/src/Stormpath.Configuration.Abstractions/Model/WebSpaConfiguration.cs deleted file mode 100644 index a8a3b92..0000000 --- a/src/Stormpath.Configuration.Abstractions/Model/WebSpaConfiguration.cs +++ /dev/null @@ -1,60 +0,0 @@ -// -// Copyright (c) 2016 Stormpath, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -namespace Stormpath.Configuration.Abstractions.Model -{ - /// - /// Represents configuration options for Single-Page Application support. - /// - /// - /// If the developer wants our integration to serve their Single Page - /// Application (SPA) in response to HTML requests for our default routes, - /// such as /login, then they will need to enable this feature and tell us - /// where the root of their SPA is. This is likely a file path on the file system. - /// - public sealed class WebSpaConfiguration - { - public WebSpaConfiguration( - bool? enabled = null, - string view = null) - { - this.Enabled = enabled ?? Default.Configuration.Web.Spa.Enabled; - this.View = view ?? Default.Configuration.Web.Spa.View; - } - - public WebSpaConfiguration(WebSpaConfiguration existing) - : this(enabled: existing?.Enabled, - view: existing?.View) - { - } - - internal WebSpaConfiguration() - { - } - - /// - /// Determines whether the SPA handling options are enabled. - /// - /// Configuration path: stormpath.web.spa.enabled - public bool? Enabled { get; internal set; } - - /// - /// The root view of the SPA. - /// - /// Configuration path: stormpath.web.spa.view - public string View { get; internal set; } - } -} \ No newline at end of file diff --git a/src/Stormpath.Configuration.Abstractions/project.json b/src/Stormpath.Configuration.Abstractions/project.json index 9160796..30dff31 100644 --- a/src/Stormpath.Configuration.Abstractions/project.json +++ b/src/Stormpath.Configuration.Abstractions/project.json @@ -29,6 +29,6 @@ "tooling": { "defaultNamespace": "Stormpath.Configuration.Abstractions" }, - "version": "2.0.0", + "version": "3.0.0", "xmlDoc": true } diff --git a/src/Stormpath.Configuration/project.json b/src/Stormpath.Configuration/project.json index cdd75a7..eac0be2 100644 --- a/src/Stormpath.Configuration/project.json +++ b/src/Stormpath.Configuration/project.json @@ -2,9 +2,9 @@ "authors": [ "Nate Barbettini" ], "copyright": "(c) 2016 Stormpath, Inc.", "dependencies": { - "FlexibleConfiguration": "1.0.0", - "Stormpath.Configuration.Abstractions": "2.0.0", - "Stormpath.SDK.Abstractions": "0.6.2" + "FlexibleConfiguration": "1.0.1", + "Stormpath.Configuration.Abstractions": "3.0.0", + "Stormpath.SDK.Abstractions": "0.7.1" }, "description": "Load Stormpath configuration from various sources.", "frameworks": { @@ -40,5 +40,5 @@ "tooling": { "defaultNamespace": "Stormpath.Configuration" }, - "version": "2.0.0" + "version": "3.0.0" } diff --git a/test/Stormpath.Configuration.Test/Default_config_tests.cs b/test/Stormpath.Configuration.Test/Default_config_tests.cs index 0db4fcd..350d60a 100644 --- a/test/Stormpath.Configuration.Test/Default_config_tests.cs +++ b/test/Stormpath.Configuration.Test/Default_config_tests.cs @@ -281,9 +281,6 @@ private static void ValidateConfig(StormpathConfiguration config) config.Web.Me.Expand["providerData"].Should().BeFalse(); config.Web.Me.Expand["tenant"].Should().BeFalse(); - config.Web.Spa.Enabled.Should().BeFalse(); - config.Web.Spa.View.Should().Be("index"); - config.Web.Unauthorized.View.Should().Be("unauthorized"); } diff --git a/test/Stormpath.Configuration.Test/Modified_config_tests.cs b/test/Stormpath.Configuration.Test/Modified_config_tests.cs index f194c73..b6a8bc5 100644 --- a/test/Stormpath.Configuration.Test/Modified_config_tests.cs +++ b/test/Stormpath.Configuration.Test/Modified_config_tests.cs @@ -226,10 +226,6 @@ public void Supplied_by_instance() enabled: false, uri: "/myself"), - spa: new WebSpaConfiguration( - enabled: true, - view: "indexView"), - unauthorizedRoute: new WebUnauthorizedConfiguration( view: "unauthorizedView") ); @@ -630,9 +626,6 @@ private static void ValidateConfig(StormpathConfiguration config) config.Web.Me.Expand.Should().HaveCount(1); config.Web.Me.Expand["directory"].Should().BeTrue(); - config.Web.Spa.Enabled.Should().BeTrue(); - config.Web.Spa.View.Should().Be("indexView"); - config.Web.Unauthorized.View.Should().Be("unauthorizedView"); } } diff --git a/test/Stormpath.Configuration.Test/project.json b/test/Stormpath.Configuration.Test/project.json index 091274f..4b951a8 100644 --- a/test/Stormpath.Configuration.Test/project.json +++ b/test/Stormpath.Configuration.Test/project.json @@ -6,7 +6,7 @@ "copyright": "(c) 2016 Stormpath, Inc.", "dependencies": { "FluentAssertions": "4.2.1", - "Stormpath.Configuration": "2.0.0", + "Stormpath.Configuration": "3.0.0", "xunit": "2.1.0", "xunit.runner.dnx": "2.1.0-rc1-build204" }, @@ -24,5 +24,5 @@ "tooling": { "defaultNamespace": "Stormpath.Configuration.Test" }, - "version": "2.0.0" + "version": "3.0.0" }