diff --git a/server-side/okta-hosted-login/okta-blazor-server-side-example.sln b/server-side/okta-hosted-login/okta-blazor-server-side-example.sln index 24ccd32..6b58b98 100644 --- a/server-side/okta-hosted-login/okta-blazor-server-side-example.sln +++ b/server-side/okta-hosted-login/okta-blazor-server-side-example.sln @@ -1,9 +1,9 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 -VisualStudioVersion = 17.4.33103.184 +VisualStudioVersion = 17.10.34707.107 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "okta-blazor-server-side-example", "okta-blazor-server-side-example\okta-blazor-server-side-example.csproj", "{58220544-0DA7-4F8B-8617-62CF1F5709A1}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "okta-blazor-server-side-example", "okta-blazor-server-side-example\okta-blazor-server-side-example.csproj", "{82B2D8D5-403C-42C3-AEAD-4AAD216D884F}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -11,15 +11,15 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {58220544-0DA7-4F8B-8617-62CF1F5709A1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {58220544-0DA7-4F8B-8617-62CF1F5709A1}.Debug|Any CPU.Build.0 = Debug|Any CPU - {58220544-0DA7-4F8B-8617-62CF1F5709A1}.Release|Any CPU.ActiveCfg = Release|Any CPU - {58220544-0DA7-4F8B-8617-62CF1F5709A1}.Release|Any CPU.Build.0 = Release|Any CPU + {82B2D8D5-403C-42C3-AEAD-4AAD216D884F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {82B2D8D5-403C-42C3-AEAD-4AAD216D884F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {82B2D8D5-403C-42C3-AEAD-4AAD216D884F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {82B2D8D5-403C-42C3-AEAD-4AAD216D884F}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {B3B8C6DE-B60D-4CFE-A189-526E91EA7434} + SolutionGuid = {F73BDD76-BFA5-40FB-9F68-0B669CF8F66D} EndGlobalSection EndGlobal diff --git a/server-side/okta-hosted-login/okta-blazor-server-side-example/App.razor b/server-side/okta-hosted-login/okta-blazor-server-side-example/App.razor deleted file mode 100644 index b4af97a..0000000 --- a/server-side/okta-hosted-login/okta-blazor-server-side-example/App.razor +++ /dev/null @@ -1,15 +0,0 @@ - - - - @* - *@ - - - - Not found - -

Sorry, there's nothing at this address.

-
-
-
-
diff --git a/server-side/okta-hosted-login/okta-blazor-server-side-example/Components/App.razor b/server-side/okta-hosted-login/okta-blazor-server-side-example/Components/App.razor new file mode 100644 index 0000000..5956864 --- /dev/null +++ b/server-side/okta-hosted-login/okta-blazor-server-side-example/Components/App.razor @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/server-side/okta-hosted-login/okta-blazor-server-side-example/Components/Layout/MainLayout.razor b/server-side/okta-hosted-login/okta-blazor-server-side-example/Components/Layout/MainLayout.razor new file mode 100644 index 0000000..7d66a93 --- /dev/null +++ b/server-side/okta-hosted-login/okta-blazor-server-side-example/Components/Layout/MainLayout.razor @@ -0,0 +1,25 @@ +@using okta_blazor_server_side_example.Components.Pages +@inherits LayoutComponentBase + +
+ + +
+
+ + About +
+ +
+ @Body +
+
+
+ +
+ An unhandled error has occurred. + Reload + 🗙 +
diff --git a/server-side/okta-hosted-login/okta-blazor-server-side-example/Shared/MainLayout.razor.css b/server-side/okta-hosted-login/okta-blazor-server-side-example/Components/Layout/MainLayout.razor.css similarity index 56% rename from server-side/okta-hosted-login/okta-blazor-server-side-example/Shared/MainLayout.razor.css rename to server-side/okta-hosted-login/okta-blazor-server-side-example/Components/Layout/MainLayout.razor.css index 551e4b2..038baf1 100644 --- a/server-side/okta-hosted-login/okta-blazor-server-side-example/Shared/MainLayout.razor.css +++ b/server-side/okta-hosted-login/okta-blazor-server-side-example/Components/Layout/MainLayout.razor.css @@ -21,26 +21,27 @@ main { align-items: center; } - .top-row ::deep a, .top-row .btn-link { + .top-row ::deep a, .top-row ::deep .btn-link { white-space: nowrap; margin-left: 1.5rem; + text-decoration: none; } - .top-row a:first-child { + .top-row ::deep a:hover, .top-row ::deep .btn-link:hover { + text-decoration: underline; + } + + .top-row ::deep a:first-child { overflow: hidden; text-overflow: ellipsis; } @media (max-width: 640.98px) { - .top-row:not(.auth) { - display: none; - } - - .top-row.auth { + .top-row { justify-content: space-between; } - .top-row a, .top-row .btn-link { + .top-row ::deep a, .top-row ::deep .btn-link { margin-left: 0; } } @@ -63,8 +64,33 @@ main { z-index: 1; } + .top-row.auth ::deep a:first-child { + flex: 1; + text-align: right; + width: 0; + } + .top-row, article { padding-left: 2rem !important; padding-right: 1.5rem !important; } } + +#blazor-error-ui { + background: lightyellow; + bottom: 0; + box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2); + display: none; + left: 0; + padding: 0.6rem 1.25rem 0.7rem 1.25rem; + position: fixed; + width: 100%; + z-index: 1000; +} + + #blazor-error-ui .dismiss { + cursor: pointer; + position: absolute; + right: 0.75rem; + top: 0.5rem; + } diff --git a/server-side/okta-hosted-login/okta-blazor-server-side-example/Shared/NavMenu.razor b/server-side/okta-hosted-login/okta-blazor-server-side-example/Components/Layout/NavMenu.razor similarity index 56% rename from server-side/okta-hosted-login/okta-blazor-server-side-example/Shared/NavMenu.razor rename to server-side/okta-hosted-login/okta-blazor-server-side-example/Components/Layout/NavMenu.razor index 4b53338..e55f41c 100644 --- a/server-side/okta-hosted-login/okta-blazor-server-side-example/Shared/NavMenu.razor +++ b/server-side/okta-hosted-login/okta-blazor-server-side-example/Components/Layout/NavMenu.razor @@ -1,27 +1,28 @@  -
+ + + -@code { - private bool collapseNavMenu = true; - - private string? NavMenuCssClass => collapseNavMenu ? "collapse" : null; - - private void ToggleNavMenu() - { - collapseNavMenu = !collapseNavMenu; - } -} diff --git a/server-side/okta-hosted-login/okta-blazor-server-side-example/Components/Layout/NavMenu.razor.css b/server-side/okta-hosted-login/okta-blazor-server-side-example/Components/Layout/NavMenu.razor.css new file mode 100644 index 0000000..4e15395 --- /dev/null +++ b/server-side/okta-hosted-login/okta-blazor-server-side-example/Components/Layout/NavMenu.razor.css @@ -0,0 +1,105 @@ +.navbar-toggler { + appearance: none; + cursor: pointer; + width: 3.5rem; + height: 2.5rem; + color: white; + position: absolute; + top: 0.5rem; + right: 1rem; + border: 1px solid rgba(255, 255, 255, 0.1); + background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.55%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") no-repeat center/1.75rem rgba(255, 255, 255, 0.1); +} + +.navbar-toggler:checked { + background-color: rgba(255, 255, 255, 0.5); +} + +.top-row { + height: 3.5rem; + background-color: rgba(0,0,0,0.4); +} + +.navbar-brand { + font-size: 1.1rem; +} + +.bi { + display: inline-block; + position: relative; + width: 1.25rem; + height: 1.25rem; + margin-right: 0.75rem; + top: -1px; + background-size: cover; +} + +.bi-house-door-fill-nav-menu { + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-house-door-fill' viewBox='0 0 16 16'%3E%3Cpath d='M6.5 14.5v-3.505c0-.245.25-.495.5-.495h2c.25 0 .5.25.5.5v3.5a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 .5-.5v-7a.5.5 0 0 0-.146-.354L13 5.793V2.5a.5.5 0 0 0-.5-.5h-1a.5.5 0 0 0-.5.5v1.293L8.354 1.146a.5.5 0 0 0-.708 0l-6 6A.5.5 0 0 0 1.5 7.5v7a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 .5-.5Z'/%3E%3C/svg%3E"); +} + +.bi-plus-square-fill-nav-menu { + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-plus-square-fill' viewBox='0 0 16 16'%3E%3Cpath d='M2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2zm6.5 4.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3a.5.5 0 0 1 1 0z'/%3E%3C/svg%3E"); +} + +.bi-list-nested-nav-menu { + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-list-nested' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M4.5 11.5A.5.5 0 0 1 5 11h10a.5.5 0 0 1 0 1H5a.5.5 0 0 1-.5-.5zm-2-4A.5.5 0 0 1 3 7h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5zm-2-4A.5.5 0 0 1 1 3h10a.5.5 0 0 1 0 1H1a.5.5 0 0 1-.5-.5z'/%3E%3C/svg%3E"); +} + +.nav-item { + font-size: 0.9rem; + padding-bottom: 0.5rem; +} + + .nav-item:first-of-type { + padding-top: 1rem; + } + + .nav-item:last-of-type { + padding-bottom: 1rem; + } + + .nav-item ::deep .nav-link { + color: #d7d7d7; + background: none; + border: none; + border-radius: 4px; + height: 3rem; + display: flex; + align-items: center; + line-height: 3rem; + width: 100%; + } + +.nav-item ::deep a.active { + background-color: rgba(255,255,255,0.37); + color: white; +} + +.nav-item ::deep .nav-link:hover { + background-color: rgba(255,255,255,0.1); + color: white; +} + +.nav-scrollable { + display: none; +} + +.navbar-toggler:checked ~ .nav-scrollable { + display: block; +} + +@media (min-width: 641px) { + .navbar-toggler { + display: none; + } + + .nav-scrollable { + /* Never collapse the sidebar for wide screens */ + display: block; + + /* Allow sidebar to scroll for tall menus */ + height: calc(100vh - 3.5rem); + overflow-y: auto; + } +} diff --git a/server-side/okta-hosted-login/okta-blazor-server-side-example/Pages/Counter.razor b/server-side/okta-hosted-login/okta-blazor-server-side-example/Components/Pages/Counter.razor similarity index 100% rename from server-side/okta-hosted-login/okta-blazor-server-side-example/Pages/Counter.razor rename to server-side/okta-hosted-login/okta-blazor-server-side-example/Components/Pages/Counter.razor diff --git a/server-side/okta-hosted-login/okta-blazor-server-side-example/Components/Pages/Error.razor b/server-side/okta-hosted-login/okta-blazor-server-side-example/Components/Pages/Error.razor new file mode 100644 index 0000000..576cc2d --- /dev/null +++ b/server-side/okta-hosted-login/okta-blazor-server-side-example/Components/Pages/Error.razor @@ -0,0 +1,36 @@ +@page "/Error" +@using System.Diagnostics + +Error + +

Error.

+

An error occurred while processing your request.

+ +@if (ShowRequestId) +{ +

+ Request ID: @RequestId +

+} + +

Development Mode

+

+ Swapping to Development environment will display more detailed information about the error that occurred. +

+

+ The Development environment shouldn't be enabled for deployed applications. + It can result in displaying sensitive information from exceptions to end users. + For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development + and restarting the app. +

+ +@code{ + [CascadingParameter] + private HttpContext? HttpContext { get; set; } + + private string? RequestId { get; set; } + private bool ShowRequestId => !string.IsNullOrEmpty(RequestId); + + protected override void OnInitialized() => + RequestId = Activity.Current?.Id ?? HttpContext?.TraceIdentifier; +} diff --git a/server-side/okta-hosted-login/okta-blazor-server-side-example/Components/Pages/Home.razor b/server-side/okta-hosted-login/okta-blazor-server-side-example/Components/Pages/Home.razor new file mode 100644 index 0000000..9001e0b --- /dev/null +++ b/server-side/okta-hosted-login/okta-blazor-server-side-example/Components/Pages/Home.razor @@ -0,0 +1,7 @@ +@page "/" + +Home + +

Hello, world!

+ +Welcome to your new app. diff --git a/server-side/okta-hosted-login/okta-blazor-server-side-example/Shared/LoginDisplay.razor b/server-side/okta-hosted-login/okta-blazor-server-side-example/Components/Pages/LoginDisplay.razor similarity index 62% rename from server-side/okta-hosted-login/okta-blazor-server-side-example/Shared/LoginDisplay.razor rename to server-side/okta-hosted-login/okta-blazor-server-side-example/Components/Pages/LoginDisplay.razor index 914f886..2d31df1 100644 --- a/server-side/okta-hosted-login/okta-blazor-server-side-example/Shared/LoginDisplay.razor +++ b/server-side/okta-hosted-login/okta-blazor-server-side-example/Components/Pages/LoginDisplay.razor @@ -1,9 +1,9 @@ - + - Hello, @context.User.Identity.Name! + Hello, @context?.User?.Identity?.Name! Sign out Sign in - \ No newline at end of file + diff --git a/server-side/okta-hosted-login/okta-blazor-server-side-example/Pages/Profile.razor b/server-side/okta-hosted-login/okta-blazor-server-side-example/Components/Pages/Profile.razor similarity index 97% rename from server-side/okta-hosted-login/okta-blazor-server-side-example/Pages/Profile.razor rename to server-side/okta-hosted-login/okta-blazor-server-side-example/Components/Pages/Profile.razor index 27beb0b..4c666f1 100644 --- a/server-side/okta-hosted-login/okta-blazor-server-side-example/Pages/Profile.razor +++ b/server-side/okta-hosted-login/okta-blazor-server-side-example/Components/Pages/Profile.razor @@ -1,4 +1,5 @@ @page "/profile" +

Profile

@@ -24,4 +25,4 @@ You are not signed in! -
\ No newline at end of file + diff --git a/server-side/okta-hosted-login/okta-blazor-server-side-example/Components/Pages/Weather.razor b/server-side/okta-hosted-login/okta-blazor-server-side-example/Components/Pages/Weather.razor new file mode 100644 index 0000000..a239d9c --- /dev/null +++ b/server-side/okta-hosted-login/okta-blazor-server-side-example/Components/Pages/Weather.razor @@ -0,0 +1,66 @@ +@page "/weather" + +@* While this page is still show in the nav menu when logged out, force a login to see page content. *@ +@attribute [Authorize] + +Weather + +

Weather

+ +

This component demonstrates showing data.

+ +@if (forecasts == null) +{ +

Loading...

+} +else +{ + + + + + + + + + + + @foreach (var forecast in forecasts) + { + + + + + + + } + +
DateTemp. (C)Temp. (F)Summary
@forecast.Date.ToShortDateString()@forecast.TemperatureC@forecast.TemperatureF@forecast.Summary
+} + +@code { + private WeatherForecast[]? forecasts; + + protected override async Task OnInitializedAsync() + { + // Simulate asynchronous loading to demonstrate a loading indicator + await Task.Delay(500); + + var startDate = DateOnly.FromDateTime(DateTime.Now); + var summaries = new[] { "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching" }; + forecasts = Enumerable.Range(1, 5).Select(index => new WeatherForecast + { + Date = startDate.AddDays(index), + TemperatureC = Random.Shared.Next(-20, 55), + Summary = summaries[Random.Shared.Next(summaries.Length)] + }).ToArray(); + } + + private class WeatherForecast + { + public DateOnly Date { get; set; } + public int TemperatureC { get; set; } + public string? Summary { get; set; } + public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); + } +} diff --git a/server-side/okta-hosted-login/okta-blazor-server-side-example/Components/Routes.razor b/server-side/okta-hosted-login/okta-blazor-server-side-example/Components/Routes.razor new file mode 100644 index 0000000..7f02c72 --- /dev/null +++ b/server-side/okta-hosted-login/okta-blazor-server-side-example/Components/Routes.razor @@ -0,0 +1,9 @@ + + + @* + + + *@ + + + diff --git a/server-side/okta-hosted-login/okta-blazor-server-side-example/_Imports.razor b/server-side/okta-hosted-login/okta-blazor-server-side-example/Components/_Imports.razor similarity index 63% rename from server-side/okta-hosted-login/okta-blazor-server-side-example/_Imports.razor rename to server-side/okta-hosted-login/okta-blazor-server-side-example/Components/_Imports.razor index 49713e6..e568c54 100644 --- a/server-side/okta-hosted-login/okta-blazor-server-side-example/_Imports.razor +++ b/server-side/okta-hosted-login/okta-blazor-server-side-example/Components/_Imports.razor @@ -1,10 +1,12 @@ @using System.Net.Http -@using Microsoft.AspNetCore.Authorization -@using Microsoft.AspNetCore.Components.Authorization +@using System.Net.Http.Json @using Microsoft.AspNetCore.Components.Forms @using Microsoft.AspNetCore.Components.Routing @using Microsoft.AspNetCore.Components.Web +@using static Microsoft.AspNetCore.Components.Web.RenderMode @using Microsoft.AspNetCore.Components.Web.Virtualization @using Microsoft.JSInterop @using okta_blazor_server_side_example -@using okta_blazor_server_side_example.Shared +@using okta_blazor_server_side_example.Components +@using Microsoft.AspNetCore.Authorization +@using Microsoft.AspNetCore.Components.Authorization \ No newline at end of file diff --git a/server-side/okta-hosted-login/okta-blazor-server-side-example/Controllers/AccountController.cs b/server-side/okta-hosted-login/okta-blazor-server-side-example/Controllers/AccountController.cs index 6f15026..8e53a47 100644 --- a/server-side/okta-hosted-login/okta-blazor-server-side-example/Controllers/AccountController.cs +++ b/server-side/okta-hosted-login/okta-blazor-server-side-example/Controllers/AccountController.cs @@ -8,6 +8,7 @@ namespace okta_blazor_server_side_example.Controllers [Route("[controller]/[action]")] public class AccountController : Controller { +#pragma warning disable CS8602 // Dereference of a possibly null reference. public IActionResult SignIn([FromQuery] string returnUrl) { if (User.Identity.IsAuthenticated) @@ -33,5 +34,6 @@ public IActionResult SignOut([FromQuery] string returnUrl) CookieAuthenticationDefaults.AuthenticationScheme, }); } +#pragma warning restore CS8602 // Dereference of a possibly null reference. } } diff --git a/server-side/okta-hosted-login/okta-blazor-server-side-example/Data/WeatherForecast.cs b/server-side/okta-hosted-login/okta-blazor-server-side-example/Data/WeatherForecast.cs deleted file mode 100644 index 07791bf..0000000 --- a/server-side/okta-hosted-login/okta-blazor-server-side-example/Data/WeatherForecast.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace okta_blazor_server_side_example.Data -{ - public class WeatherForecast - { - public DateTime Date { get; set; } - - public int TemperatureC { get; set; } - - public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); - - public string? Summary { get; set; } - } -} \ No newline at end of file diff --git a/server-side/okta-hosted-login/okta-blazor-server-side-example/Data/WeatherForecastService.cs b/server-side/okta-hosted-login/okta-blazor-server-side-example/Data/WeatherForecastService.cs deleted file mode 100644 index b83cdce..0000000 --- a/server-side/okta-hosted-login/okta-blazor-server-side-example/Data/WeatherForecastService.cs +++ /dev/null @@ -1,20 +0,0 @@ -namespace okta_blazor_server_side_example.Data -{ - public class WeatherForecastService - { - private static readonly string[] Summaries = new[] - { - "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching" - }; - - public Task GetForecastAsync(DateTime startDate) - { - return Task.FromResult(Enumerable.Range(1, 5).Select(index => new WeatherForecast - { - Date = startDate.AddDays(index), - TemperatureC = Random.Shared.Next(-20, 55), - Summary = Summaries[Random.Shared.Next(Summaries.Length)] - }).ToArray()); - } - } -} \ No newline at end of file diff --git a/server-side/okta-hosted-login/okta-blazor-server-side-example/Pages/Error.cshtml b/server-side/okta-hosted-login/okta-blazor-server-side-example/Pages/Error.cshtml deleted file mode 100644 index da8f6f8..0000000 --- a/server-side/okta-hosted-login/okta-blazor-server-side-example/Pages/Error.cshtml +++ /dev/null @@ -1,42 +0,0 @@ -@page -@model okta_blazor_server_side_example.Pages.ErrorModel - - - - - - - - Error - - - - - -
-
-

Error.

-

An error occurred while processing your request.

- - @if (Model.ShowRequestId) - { -

- Request ID: @Model.RequestId -

- } - -

Development Mode

-

- Swapping to the Development environment displays detailed information about the error that occurred. -

-

- The Development environment shouldn't be enabled for deployed applications. - It can result in displaying sensitive information from exceptions to end users. - For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development - and restarting the app. -

-
-
- - - diff --git a/server-side/okta-hosted-login/okta-blazor-server-side-example/Pages/Error.cshtml.cs b/server-side/okta-hosted-login/okta-blazor-server-side-example/Pages/Error.cshtml.cs deleted file mode 100644 index f2e0941..0000000 --- a/server-side/okta-hosted-login/okta-blazor-server-side-example/Pages/Error.cshtml.cs +++ /dev/null @@ -1,27 +0,0 @@ -using Microsoft.AspNetCore.Mvc; -using Microsoft.AspNetCore.Mvc.RazorPages; -using System.Diagnostics; - -namespace okta_blazor_server_side_example.Pages -{ - [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] - [IgnoreAntiforgeryToken] - public class ErrorModel : PageModel - { - public string? RequestId { get; set; } - - public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); - - private readonly ILogger _logger; - - public ErrorModel(ILogger logger) - { - _logger = logger; - } - - public void OnGet() - { - RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier; - } - } -} \ No newline at end of file diff --git a/server-side/okta-hosted-login/okta-blazor-server-side-example/Pages/FetchData.razor b/server-side/okta-hosted-login/okta-blazor-server-side-example/Pages/FetchData.razor deleted file mode 100644 index 0ff1fcc..0000000 --- a/server-side/okta-hosted-login/okta-blazor-server-side-example/Pages/FetchData.razor +++ /dev/null @@ -1,48 +0,0 @@ -@page "/fetchdata" - -Weather forecast - -@using okta_blazor_server_side_example.Data -@inject WeatherForecastService ForecastService - -

Weather forecast

- -

This component demonstrates fetching data from a service.

- -@if (forecasts == null) -{ -

Loading...

-} -else -{ - - - - - - - - - - - @foreach (var forecast in forecasts) - { - - - - - - - } - -
DateTemp. (C)Temp. (F)Summary
@forecast.Date.ToShortDateString()@forecast.TemperatureC@forecast.TemperatureF@forecast.Summary
-} - -@code { - private WeatherForecast[]? forecasts; - - protected override async Task OnInitializedAsync() - { - forecasts = await ForecastService.GetForecastAsync(DateTime.Now); - } -} diff --git a/server-side/okta-hosted-login/okta-blazor-server-side-example/Pages/Index.razor b/server-side/okta-hosted-login/okta-blazor-server-side-example/Pages/Index.razor deleted file mode 100644 index 6085c4a..0000000 --- a/server-side/okta-hosted-login/okta-blazor-server-side-example/Pages/Index.razor +++ /dev/null @@ -1,9 +0,0 @@ -@page "/" - -Index - -

Hello, world!

- -Welcome to your new app. - - diff --git a/server-side/okta-hosted-login/okta-blazor-server-side-example/Pages/_Host.cshtml b/server-side/okta-hosted-login/okta-blazor-server-side-example/Pages/_Host.cshtml deleted file mode 100644 index 26e05cb..0000000 --- a/server-side/okta-hosted-login/okta-blazor-server-side-example/Pages/_Host.cshtml +++ /dev/null @@ -1,8 +0,0 @@ -@page "/" -@namespace okta_blazor_server_side_example.Pages -@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers -@{ - Layout = "_Layout"; -} - - diff --git a/server-side/okta-hosted-login/okta-blazor-server-side-example/Pages/_Layout.cshtml b/server-side/okta-hosted-login/okta-blazor-server-side-example/Pages/_Layout.cshtml deleted file mode 100644 index 40b4d8d..0000000 --- a/server-side/okta-hosted-login/okta-blazor-server-side-example/Pages/_Layout.cshtml +++ /dev/null @@ -1,32 +0,0 @@ -@using Microsoft.AspNetCore.Components.Web -@namespace okta_blazor_server_side_example.Pages -@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers - - - - - - - - - - - - - - @RenderBody() - -
- - An error has occurred. This application may no longer respond until reloaded. - - - An unhandled exception has occurred. See browser dev tools for details. - - Reload - 🗙 -
- - - - diff --git a/server-side/okta-hosted-login/okta-blazor-server-side-example/Program.cs b/server-side/okta-hosted-login/okta-blazor-server-side-example/Program.cs index 1fded6b..5f4093e 100644 --- a/server-side/okta-hosted-login/okta-blazor-server-side-example/Program.cs +++ b/server-side/okta-hosted-login/okta-blazor-server-side-example/Program.cs @@ -1,22 +1,21 @@ +using okta_blazor_server_side_example.Components; +using Okta.AspNetCore; using Microsoft.AspNetCore.Authentication.Cookies; using Microsoft.AspNetCore.Authentication.OpenIdConnect; -using Microsoft.AspNetCore.Components; -using Microsoft.AspNetCore.Components.Web; -using Okta.AspNetCore; - -using okta_blazor_server_side_example.Data; +using Microsoft.IdentityModel.Tokens; var builder = WebApplication.CreateBuilder(args); // Add services to the container. -builder.Services.AddRazorPages(); -builder.Services.AddServerSideBlazor(); -builder.Services.AddSingleton(); +builder.Services.AddRazorComponents() + .AddInteractiveServerComponents(); + +// Add Okta Auth: builder.Services.AddAuthentication(options => - { - options.DefaultScheme = CookieAuthenticationDefaults.AuthenticationScheme; - options.DefaultChallengeScheme = OpenIdConnectDefaults.AuthenticationScheme; - }) +{ + options.DefaultScheme = CookieAuthenticationDefaults.AuthenticationScheme; + options.DefaultChallengeScheme = OpenIdConnectDefaults.AuthenticationScheme; +}) .AddCookie() .AddOktaMvc(new OktaMvcOptions { @@ -26,13 +25,15 @@ ClientSecret = builder.Configuration.GetValue("Okta:ClientSecret"), AuthorizationServerId = builder.Configuration.GetValue("Okta:AuthorizationServerId"), }); +// To pick up AccountController: +builder.Services.AddControllers(); var app = builder.Build(); // Configure the HTTP request pipeline. if (!app.Environment.IsDevelopment()) { - app.UseExceptionHandler("/Error"); + app.UseExceptionHandler("/Error", createScopeForErrors: true); // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. app.UseHsts(); } @@ -40,14 +41,15 @@ app.UseHttpsRedirection(); app.UseStaticFiles(); +app.UseAntiforgery(); -app.UseRouting(); - +// Add AuthN and AuthR, configured to Okta above: app.UseAuthentication(); app.UseAuthorization(); - +// To pick up AccountController: app.MapControllers(); -app.MapBlazorHub(); -app.MapFallbackToPage("/_Host"); + +app.MapRazorComponents() + .AddInteractiveServerRenderMode(); app.Run(); diff --git a/server-side/okta-hosted-login/okta-blazor-server-side-example/Properties/launchSettings.json b/server-side/okta-hosted-login/okta-blazor-server-side-example/Properties/launchSettings.json index 374f767..69a8a1f 100644 --- a/server-side/okta-hosted-login/okta-blazor-server-side-example/Properties/launchSettings.json +++ b/server-side/okta-hosted-login/okta-blazor-server-side-example/Properties/launchSettings.json @@ -1,27 +1,38 @@ { - "iisSettings": { - "windowsAuthentication": false, - "anonymousAuthentication": true, - "iisExpress": { - "applicationUrl": "http://localhost:5000", - "sslPort": 44314 - } - }, - "profiles": { - "IIS Express": { - "commandName": "IISExpress", - "launchBrowser": true, - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" + "$schema": "http://json.schemastore.org/launchsettings.json", + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:59846", + "sslPort": 44356 } }, - "okta-blazor-server-side-example": { - "commandName": "Project", - "launchBrowser": true, - "applicationUrl": "https://localhost:5001;http://localhost:5000", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" + "profiles": { + "http": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": true, + "applicationUrl": "http://localhost:5096", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "https": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": true, + "applicationUrl": "https://localhost:7003;http://localhost:5096", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } } } } -} \ No newline at end of file diff --git a/server-side/okta-hosted-login/okta-blazor-server-side-example/Shared/MainLayout.razor b/server-side/okta-hosted-login/okta-blazor-server-side-example/Shared/MainLayout.razor deleted file mode 100644 index e2a07ec..0000000 --- a/server-side/okta-hosted-login/okta-blazor-server-side-example/Shared/MainLayout.razor +++ /dev/null @@ -1,20 +0,0 @@ -@inherits LayoutComponentBase - -okta-blazor-server-side-example - -
- - -
-
- - About -
- -
- @Body -
-
-
diff --git a/server-side/okta-hosted-login/okta-blazor-server-side-example/Shared/NavMenu.razor.css b/server-side/okta-hosted-login/okta-blazor-server-side-example/Shared/NavMenu.razor.css deleted file mode 100644 index acc5f9f..0000000 --- a/server-side/okta-hosted-login/okta-blazor-server-side-example/Shared/NavMenu.razor.css +++ /dev/null @@ -1,62 +0,0 @@ -.navbar-toggler { - background-color: rgba(255, 255, 255, 0.1); -} - -.top-row { - height: 3.5rem; - background-color: rgba(0,0,0,0.4); -} - -.navbar-brand { - font-size: 1.1rem; -} - -.oi { - width: 2rem; - font-size: 1.1rem; - vertical-align: text-top; - top: -2px; -} - -.nav-item { - font-size: 0.9rem; - padding-bottom: 0.5rem; -} - - .nav-item:first-of-type { - padding-top: 1rem; - } - - .nav-item:last-of-type { - padding-bottom: 1rem; - } - - .nav-item ::deep a { - color: #d7d7d7; - border-radius: 4px; - height: 3rem; - display: flex; - align-items: center; - line-height: 3rem; - } - -.nav-item ::deep a.active { - background-color: rgba(255,255,255,0.25); - color: white; -} - -.nav-item ::deep a:hover { - background-color: rgba(255,255,255,0.1); - color: white; -} - -@media (min-width: 641px) { - .navbar-toggler { - display: none; - } - - .collapse { - /* Never collapse the sidebar for wide screens */ - display: block; - } -} diff --git a/server-side/okta-hosted-login/okta-blazor-server-side-example/Shared/SurveyPrompt.razor b/server-side/okta-hosted-login/okta-blazor-server-side-example/Shared/SurveyPrompt.razor deleted file mode 100644 index e3e6429..0000000 --- a/server-side/okta-hosted-login/okta-blazor-server-side-example/Shared/SurveyPrompt.razor +++ /dev/null @@ -1,16 +0,0 @@ -
- - @Title - - - Please take our - brief survey - - and tell us what you think. -
- -@code { - // Demonstrates how a parent component can supply parameters - [Parameter] - public string? Title { get; set; } -} diff --git a/server-side/okta-hosted-login/okta-blazor-server-side-example/appsettings.Development.json b/server-side/okta-hosted-login/okta-blazor-server-side-example/appsettings.Development.json index 770d3e9..0c208ae 100644 --- a/server-side/okta-hosted-login/okta-blazor-server-side-example/appsettings.Development.json +++ b/server-side/okta-hosted-login/okta-blazor-server-side-example/appsettings.Development.json @@ -1,5 +1,4 @@ { - "DetailedErrors": true, "Logging": { "LogLevel": { "Default": "Information", diff --git a/server-side/okta-hosted-login/okta-blazor-server-side-example/appsettings.json b/server-side/okta-hosted-login/okta-blazor-server-side-example/appsettings.json index 6be3aef..0716ca1 100644 --- a/server-side/okta-hosted-login/okta-blazor-server-side-example/appsettings.json +++ b/server-side/okta-hosted-login/okta-blazor-server-side-example/appsettings.json @@ -2,8 +2,7 @@ "Logging": { "LogLevel": { "Default": "Information", - "Microsoft": "Warning", - "Microsoft.Hosting.Lifetime": "Information" + "Microsoft.AspNetCore": "Warning" } }, "AllowedHosts": "*", diff --git a/server-side/okta-hosted-login/okta-blazor-server-side-example/okta-blazor-server-side-example.csproj b/server-side/okta-hosted-login/okta-blazor-server-side-example/okta-blazor-server-side-example.csproj index aac7865..99279db 100644 --- a/server-side/okta-hosted-login/okta-blazor-server-side-example/okta-blazor-server-side-example.csproj +++ b/server-side/okta-hosted-login/okta-blazor-server-side-example/okta-blazor-server-side-example.csproj @@ -1,15 +1,14 @@ - net6.0 + net8.0 enable enable - okta_blazor_server_side_example - 2.0.0 + okta-blazor-server-side-example + $(AssemblyName.Replace(' ', '_')) - + - diff --git a/server-side/okta-hosted-login/okta-blazor-server-side-example/wwwroot/css/site.css b/server-side/okta-hosted-login/okta-blazor-server-side-example/wwwroot/app.css similarity index 81% rename from server-side/okta-hosted-login/okta-blazor-server-side-example/wwwroot/css/site.css rename to server-side/okta-hosted-login/okta-blazor-server-side-example/wwwroot/app.css index 1f4b8cf..2bd9b78 100644 --- a/server-side/okta-hosted-login/okta-blazor-server-side-example/wwwroot/css/site.css +++ b/server-side/okta-hosted-login/okta-blazor-server-side-example/wwwroot/app.css @@ -1,15 +1,9 @@ -@import url('open-iconic/font/css/open-iconic-bootstrap.min.css'); - html, body { font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; } -h1:focus { - outline: none; -} - a, .btn-link { - color: #0071c1; + color: #006bb7; } .btn-primary { @@ -18,41 +12,30 @@ a, .btn-link { border-color: #1861ac; } +.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus { + box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb; +} + .content { padding-top: 1.1rem; } +h1:focus { + outline: none; +} + .valid.modified:not([type=checkbox]) { outline: 1px solid #26b050; } .invalid { - outline: 1px solid red; + outline: 1px solid #e50000; } .validation-message { - color: red; -} - -#blazor-error-ui { - background: lightyellow; - bottom: 0; - box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2); - display: none; - left: 0; - padding: 0.6rem 1.25rem 0.7rem 1.25rem; - position: fixed; - width: 100%; - z-index: 1000; + color: #e50000; } - #blazor-error-ui .dismiss { - cursor: pointer; - position: absolute; - right: 0.75rem; - top: 0.5rem; - } - .blazor-error-boundary { background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121; padding: 1rem 1rem 1rem 3.7rem; @@ -62,3 +45,7 @@ a, .btn-link { .blazor-error-boundary::after { content: "An error has occurred." } + +.darker-border-checkbox.form-check-input { + border-color: #929292; +} diff --git a/server-side/okta-hosted-login/okta-blazor-server-side-example/wwwroot/css/bootstrap/bootstrap.min.css b/server-side/okta-hosted-login/okta-blazor-server-side-example/wwwroot/bootstrap/bootstrap.min.css similarity index 100% rename from server-side/okta-hosted-login/okta-blazor-server-side-example/wwwroot/css/bootstrap/bootstrap.min.css rename to server-side/okta-hosted-login/okta-blazor-server-side-example/wwwroot/bootstrap/bootstrap.min.css diff --git a/server-side/okta-hosted-login/okta-blazor-server-side-example/wwwroot/css/bootstrap/bootstrap.min.css.map b/server-side/okta-hosted-login/okta-blazor-server-side-example/wwwroot/bootstrap/bootstrap.min.css.map similarity index 100% rename from server-side/okta-hosted-login/okta-blazor-server-side-example/wwwroot/css/bootstrap/bootstrap.min.css.map rename to server-side/okta-hosted-login/okta-blazor-server-side-example/wwwroot/bootstrap/bootstrap.min.css.map diff --git a/server-side/okta-hosted-login/okta-blazor-server-side-example/wwwroot/css/open-iconic/FONT-LICENSE b/server-side/okta-hosted-login/okta-blazor-server-side-example/wwwroot/css/open-iconic/FONT-LICENSE deleted file mode 100644 index a1dc03f..0000000 --- a/server-side/okta-hosted-login/okta-blazor-server-side-example/wwwroot/css/open-iconic/FONT-LICENSE +++ /dev/null @@ -1,86 +0,0 @@ -SIL OPEN FONT LICENSE Version 1.1 - -Copyright (c) 2014 Waybury - -PREAMBLE -The goals of the Open Font License (OFL) are to stimulate worldwide -development of collaborative font projects, to support the font creation -efforts of academic and linguistic communities, and to provide a free and -open framework in which fonts may be shared and improved in partnership -with others. - -The OFL allows the licensed fonts to be used, studied, modified and -redistributed freely as long as they are not sold by themselves. The -fonts, including any derivative works, can be bundled, embedded, -redistributed and/or sold with any software provided that any reserved -names are not used by derivative works. The fonts and derivatives, -however, cannot be released under any other type of license. The -requirement for fonts to remain under this license does not apply -to any document created using the fonts or their derivatives. - -DEFINITIONS -"Font Software" refers to the set of files released by the Copyright -Holder(s) under this license and clearly marked as such. This may -include source files, build scripts and documentation. - -"Reserved Font Name" refers to any names specified as such after the -copyright statement(s). - -"Original Version" refers to the collection of Font Software components as -distributed by the Copyright Holder(s). - -"Modified Version" refers to any derivative made by adding to, deleting, -or substituting -- in part or in whole -- any of the components of the -Original Version, by changing formats or by porting the Font Software to a -new environment. - -"Author" refers to any designer, engineer, programmer, technical -writer or other person who contributed to the Font Software. - -PERMISSION & CONDITIONS -Permission is hereby granted, free of charge, to any person obtaining -a copy of the Font Software, to use, study, copy, merge, embed, modify, -redistribute, and sell modified and unmodified copies of the Font -Software, subject to the following conditions: - -1) Neither the Font Software nor any of its individual components, -in Original or Modified Versions, may be sold by itself. - -2) Original or Modified Versions of the Font Software may be bundled, -redistributed and/or sold with any software, provided that each copy -contains the above copyright notice and this license. These can be -included either as stand-alone text files, human-readable headers or -in the appropriate machine-readable metadata fields within text or -binary files as long as those fields can be easily viewed by the user. - -3) No Modified Version of the Font Software may use the Reserved Font -Name(s) unless explicit written permission is granted by the corresponding -Copyright Holder. This restriction only applies to the primary font name as -presented to the users. - -4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font -Software shall not be used to promote, endorse or advertise any -Modified Version, except to acknowledge the contribution(s) of the -Copyright Holder(s) and the Author(s) or with their explicit written -permission. - -5) The Font Software, modified or unmodified, in part or in whole, -must be distributed entirely under this license, and must not be -distributed under any other license. The requirement for fonts to -remain under this license does not apply to any document created -using the Font Software. - -TERMINATION -This license becomes null and void if any of the above conditions are -not met. - -DISCLAIMER -THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE -COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL -DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM -OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/server-side/okta-hosted-login/okta-blazor-server-side-example/wwwroot/css/open-iconic/ICON-LICENSE b/server-side/okta-hosted-login/okta-blazor-server-side-example/wwwroot/css/open-iconic/ICON-LICENSE deleted file mode 100644 index 2199f4a..0000000 --- a/server-side/okta-hosted-login/okta-blazor-server-side-example/wwwroot/css/open-iconic/ICON-LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Waybury - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/server-side/okta-hosted-login/okta-blazor-server-side-example/wwwroot/css/open-iconic/README.md b/server-side/okta-hosted-login/okta-blazor-server-side-example/wwwroot/css/open-iconic/README.md deleted file mode 100644 index 6b810e4..0000000 --- a/server-side/okta-hosted-login/okta-blazor-server-side-example/wwwroot/css/open-iconic/README.md +++ /dev/null @@ -1,114 +0,0 @@ -[Open Iconic v1.1.1](http://useiconic.com/open) -=========== - -### Open Iconic is the open source sibling of [Iconic](http://useiconic.com). It is a hyper-legible collection of 223 icons with a tiny footprint—ready to use with Bootstrap and Foundation. [View the collection](http://useiconic.com/open#icons) - - - -## What's in Open Iconic? - -* 223 icons designed to be legible down to 8 pixels -* Super-light SVG files - 61.8 for the entire set -* SVG sprite—the modern replacement for icon fonts -* Webfont (EOT, OTF, SVG, TTF, WOFF), PNG and WebP formats -* Webfont stylesheets (including versions for Bootstrap and Foundation) in CSS, LESS, SCSS and Stylus formats -* PNG and WebP raster images in 8px, 16px, 24px, 32px, 48px and 64px. - - -## Getting Started - -#### For code samples and everything else you need to get started with Open Iconic, check out our [Icons](http://useiconic.com/open#icons) and [Reference](http://useiconic.com/open#reference) sections. - -### General Usage - -#### Using Open Iconic's SVGs - -We like SVGs and we think they're the way to display icons on the web. Since Open Iconic are just basic SVGs, we suggest you display them like you would any other image (don't forget the `alt` attribute). - -``` -icon name -``` - -#### Using Open Iconic's SVG Sprite - -Open Iconic also comes in a SVG sprite which allows you to display all the icons in the set with a single request. It's like an icon font, without being a hack. - -Adding an icon from an SVG sprite is a little different than what you're used to, but it's still a piece of cake. *Tip: To make your icons easily style able, we suggest adding a general class to the* `` *tag and a unique class name for each different icon in the* `` *tag.* - -``` - - - -``` - -Sizing icons only needs basic CSS. All the icons are in a square format, so just set the `` tag with equal width and height dimensions. - -``` -.icon { - width: 16px; - height: 16px; -} -``` - -Coloring icons is even easier. All you need to do is set the `fill` rule on the `` tag. - -``` -.icon-account-login { - fill: #f00; -} -``` - -To learn more about SVG Sprites, read [Chris Coyier's guide](http://css-tricks.com/svg-sprites-use-better-icon-fonts/). - -#### Using Open Iconic's Icon Font... - - -##### …with Bootstrap - -You can find our Bootstrap stylesheets in `font/css/open-iconic-bootstrap.{css, less, scss, styl}` - - -``` - -``` - - -``` - -``` - -##### …with Foundation - -You can find our Foundation stylesheets in `font/css/open-iconic-foundation.{css, less, scss, styl}` - -``` - -``` - - -``` - -``` - -##### …on its own - -You can find our default stylesheets in `font/css/open-iconic.{css, less, scss, styl}` - -``` - -``` - -``` - -``` - - -## License - -### Icons - -All code (including SVG markup) is under the [MIT License](http://opensource.org/licenses/MIT). - -### Fonts - -All fonts are under the [SIL Licensed](http://scripts.sil.org/cms/scripts/page.php?item_id=OFL_web). diff --git a/server-side/okta-hosted-login/okta-blazor-server-side-example/wwwroot/css/open-iconic/font/css/open-iconic-bootstrap.min.css b/server-side/okta-hosted-login/okta-blazor-server-side-example/wwwroot/css/open-iconic/font/css/open-iconic-bootstrap.min.css deleted file mode 100644 index 4664f2e..0000000 --- a/server-side/okta-hosted-login/okta-blazor-server-side-example/wwwroot/css/open-iconic/font/css/open-iconic-bootstrap.min.css +++ /dev/null @@ -1 +0,0 @@ -@font-face{font-family:Icons;src:url(../fonts/open-iconic.eot);src:url(../fonts/open-iconic.eot?#iconic-sm) format('embedded-opentype'),url(../fonts/open-iconic.woff) format('woff'),url(../fonts/open-iconic.ttf) format('truetype'),url(../fonts/open-iconic.otf) format('opentype'),url(../fonts/open-iconic.svg#iconic-sm) format('svg');font-weight:400;font-style:normal}.oi{position:relative;top:1px;display:inline-block;speak:none;font-family:Icons;font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.oi:empty:before{width:1em;text-align:center;box-sizing:content-box}.oi.oi-align-center:before{text-align:center}.oi.oi-align-left:before{text-align:left}.oi.oi-align-right:before{text-align:right}.oi.oi-flip-horizontal:before{-webkit-transform:scale(-1,1);-ms-transform:scale(-1,1);transform:scale(-1,1)}.oi.oi-flip-vertical:before{-webkit-transform:scale(1,-1);-ms-transform:scale(-1,1);transform:scale(1,-1)}.oi.oi-flip-horizontal-vertical:before{-webkit-transform:scale(-1,-1);-ms-transform:scale(-1,1);transform:scale(-1,-1)}.oi-account-login:before{content:'\e000'}.oi-account-logout:before{content:'\e001'}.oi-action-redo:before{content:'\e002'}.oi-action-undo:before{content:'\e003'}.oi-align-center:before{content:'\e004'}.oi-align-left:before{content:'\e005'}.oi-align-right:before{content:'\e006'}.oi-aperture:before{content:'\e007'}.oi-arrow-bottom:before{content:'\e008'}.oi-arrow-circle-bottom:before{content:'\e009'}.oi-arrow-circle-left:before{content:'\e00a'}.oi-arrow-circle-right:before{content:'\e00b'}.oi-arrow-circle-top:before{content:'\e00c'}.oi-arrow-left:before{content:'\e00d'}.oi-arrow-right:before{content:'\e00e'}.oi-arrow-thick-bottom:before{content:'\e00f'}.oi-arrow-thick-left:before{content:'\e010'}.oi-arrow-thick-right:before{content:'\e011'}.oi-arrow-thick-top:before{content:'\e012'}.oi-arrow-top:before{content:'\e013'}.oi-audio-spectrum:before{content:'\e014'}.oi-audio:before{content:'\e015'}.oi-badge:before{content:'\e016'}.oi-ban:before{content:'\e017'}.oi-bar-chart:before{content:'\e018'}.oi-basket:before{content:'\e019'}.oi-battery-empty:before{content:'\e01a'}.oi-battery-full:before{content:'\e01b'}.oi-beaker:before{content:'\e01c'}.oi-bell:before{content:'\e01d'}.oi-bluetooth:before{content:'\e01e'}.oi-bold:before{content:'\e01f'}.oi-bolt:before{content:'\e020'}.oi-book:before{content:'\e021'}.oi-bookmark:before{content:'\e022'}.oi-box:before{content:'\e023'}.oi-briefcase:before{content:'\e024'}.oi-british-pound:before{content:'\e025'}.oi-browser:before{content:'\e026'}.oi-brush:before{content:'\e027'}.oi-bug:before{content:'\e028'}.oi-bullhorn:before{content:'\e029'}.oi-calculator:before{content:'\e02a'}.oi-calendar:before{content:'\e02b'}.oi-camera-slr:before{content:'\e02c'}.oi-caret-bottom:before{content:'\e02d'}.oi-caret-left:before{content:'\e02e'}.oi-caret-right:before{content:'\e02f'}.oi-caret-top:before{content:'\e030'}.oi-cart:before{content:'\e031'}.oi-chat:before{content:'\e032'}.oi-check:before{content:'\e033'}.oi-chevron-bottom:before{content:'\e034'}.oi-chevron-left:before{content:'\e035'}.oi-chevron-right:before{content:'\e036'}.oi-chevron-top:before{content:'\e037'}.oi-circle-check:before{content:'\e038'}.oi-circle-x:before{content:'\e039'}.oi-clipboard:before{content:'\e03a'}.oi-clock:before{content:'\e03b'}.oi-cloud-download:before{content:'\e03c'}.oi-cloud-upload:before{content:'\e03d'}.oi-cloud:before{content:'\e03e'}.oi-cloudy:before{content:'\e03f'}.oi-code:before{content:'\e040'}.oi-cog:before{content:'\e041'}.oi-collapse-down:before{content:'\e042'}.oi-collapse-left:before{content:'\e043'}.oi-collapse-right:before{content:'\e044'}.oi-collapse-up:before{content:'\e045'}.oi-command:before{content:'\e046'}.oi-comment-square:before{content:'\e047'}.oi-compass:before{content:'\e048'}.oi-contrast:before{content:'\e049'}.oi-copywriting:before{content:'\e04a'}.oi-credit-card:before{content:'\e04b'}.oi-crop:before{content:'\e04c'}.oi-dashboard:before{content:'\e04d'}.oi-data-transfer-download:before{content:'\e04e'}.oi-data-transfer-upload:before{content:'\e04f'}.oi-delete:before{content:'\e050'}.oi-dial:before{content:'\e051'}.oi-document:before{content:'\e052'}.oi-dollar:before{content:'\e053'}.oi-double-quote-sans-left:before{content:'\e054'}.oi-double-quote-sans-right:before{content:'\e055'}.oi-double-quote-serif-left:before{content:'\e056'}.oi-double-quote-serif-right:before{content:'\e057'}.oi-droplet:before{content:'\e058'}.oi-eject:before{content:'\e059'}.oi-elevator:before{content:'\e05a'}.oi-ellipses:before{content:'\e05b'}.oi-envelope-closed:before{content:'\e05c'}.oi-envelope-open:before{content:'\e05d'}.oi-euro:before{content:'\e05e'}.oi-excerpt:before{content:'\e05f'}.oi-expand-down:before{content:'\e060'}.oi-expand-left:before{content:'\e061'}.oi-expand-right:before{content:'\e062'}.oi-expand-up:before{content:'\e063'}.oi-external-link:before{content:'\e064'}.oi-eye:before{content:'\e065'}.oi-eyedropper:before{content:'\e066'}.oi-file:before{content:'\e067'}.oi-fire:before{content:'\e068'}.oi-flag:before{content:'\e069'}.oi-flash:before{content:'\e06a'}.oi-folder:before{content:'\e06b'}.oi-fork:before{content:'\e06c'}.oi-fullscreen-enter:before{content:'\e06d'}.oi-fullscreen-exit:before{content:'\e06e'}.oi-globe:before{content:'\e06f'}.oi-graph:before{content:'\e070'}.oi-grid-four-up:before{content:'\e071'}.oi-grid-three-up:before{content:'\e072'}.oi-grid-two-up:before{content:'\e073'}.oi-hard-drive:before{content:'\e074'}.oi-header:before{content:'\e075'}.oi-headphones:before{content:'\e076'}.oi-heart:before{content:'\e077'}.oi-home:before{content:'\e078'}.oi-image:before{content:'\e079'}.oi-inbox:before{content:'\e07a'}.oi-infinity:before{content:'\e07b'}.oi-info:before{content:'\e07c'}.oi-italic:before{content:'\e07d'}.oi-justify-center:before{content:'\e07e'}.oi-justify-left:before{content:'\e07f'}.oi-justify-right:before{content:'\e080'}.oi-key:before{content:'\e081'}.oi-laptop:before{content:'\e082'}.oi-layers:before{content:'\e083'}.oi-lightbulb:before{content:'\e084'}.oi-link-broken:before{content:'\e085'}.oi-link-intact:before{content:'\e086'}.oi-list-rich:before{content:'\e087'}.oi-list:before{content:'\e088'}.oi-location:before{content:'\e089'}.oi-lock-locked:before{content:'\e08a'}.oi-lock-unlocked:before{content:'\e08b'}.oi-loop-circular:before{content:'\e08c'}.oi-loop-square:before{content:'\e08d'}.oi-loop:before{content:'\e08e'}.oi-magnifying-glass:before{content:'\e08f'}.oi-map-marker:before{content:'\e090'}.oi-map:before{content:'\e091'}.oi-media-pause:before{content:'\e092'}.oi-media-play:before{content:'\e093'}.oi-media-record:before{content:'\e094'}.oi-media-skip-backward:before{content:'\e095'}.oi-media-skip-forward:before{content:'\e096'}.oi-media-step-backward:before{content:'\e097'}.oi-media-step-forward:before{content:'\e098'}.oi-media-stop:before{content:'\e099'}.oi-medical-cross:before{content:'\e09a'}.oi-menu:before{content:'\e09b'}.oi-microphone:before{content:'\e09c'}.oi-minus:before{content:'\e09d'}.oi-monitor:before{content:'\e09e'}.oi-moon:before{content:'\e09f'}.oi-move:before{content:'\e0a0'}.oi-musical-note:before{content:'\e0a1'}.oi-paperclip:before{content:'\e0a2'}.oi-pencil:before{content:'\e0a3'}.oi-people:before{content:'\e0a4'}.oi-person:before{content:'\e0a5'}.oi-phone:before{content:'\e0a6'}.oi-pie-chart:before{content:'\e0a7'}.oi-pin:before{content:'\e0a8'}.oi-play-circle:before{content:'\e0a9'}.oi-plus:before{content:'\e0aa'}.oi-power-standby:before{content:'\e0ab'}.oi-print:before{content:'\e0ac'}.oi-project:before{content:'\e0ad'}.oi-pulse:before{content:'\e0ae'}.oi-puzzle-piece:before{content:'\e0af'}.oi-question-mark:before{content:'\e0b0'}.oi-rain:before{content:'\e0b1'}.oi-random:before{content:'\e0b2'}.oi-reload:before{content:'\e0b3'}.oi-resize-both:before{content:'\e0b4'}.oi-resize-height:before{content:'\e0b5'}.oi-resize-width:before{content:'\e0b6'}.oi-rss-alt:before{content:'\e0b7'}.oi-rss:before{content:'\e0b8'}.oi-script:before{content:'\e0b9'}.oi-share-boxed:before{content:'\e0ba'}.oi-share:before{content:'\e0bb'}.oi-shield:before{content:'\e0bc'}.oi-signal:before{content:'\e0bd'}.oi-signpost:before{content:'\e0be'}.oi-sort-ascending:before{content:'\e0bf'}.oi-sort-descending:before{content:'\e0c0'}.oi-spreadsheet:before{content:'\e0c1'}.oi-star:before{content:'\e0c2'}.oi-sun:before{content:'\e0c3'}.oi-tablet:before{content:'\e0c4'}.oi-tag:before{content:'\e0c5'}.oi-tags:before{content:'\e0c6'}.oi-target:before{content:'\e0c7'}.oi-task:before{content:'\e0c8'}.oi-terminal:before{content:'\e0c9'}.oi-text:before{content:'\e0ca'}.oi-thumb-down:before{content:'\e0cb'}.oi-thumb-up:before{content:'\e0cc'}.oi-timer:before{content:'\e0cd'}.oi-transfer:before{content:'\e0ce'}.oi-trash:before{content:'\e0cf'}.oi-underline:before{content:'\e0d0'}.oi-vertical-align-bottom:before{content:'\e0d1'}.oi-vertical-align-center:before{content:'\e0d2'}.oi-vertical-align-top:before{content:'\e0d3'}.oi-video:before{content:'\e0d4'}.oi-volume-high:before{content:'\e0d5'}.oi-volume-low:before{content:'\e0d6'}.oi-volume-off:before{content:'\e0d7'}.oi-warning:before{content:'\e0d8'}.oi-wifi:before{content:'\e0d9'}.oi-wrench:before{content:'\e0da'}.oi-x:before{content:'\e0db'}.oi-yen:before{content:'\e0dc'}.oi-zoom-in:before{content:'\e0dd'}.oi-zoom-out:before{content:'\e0de'} \ No newline at end of file diff --git a/server-side/okta-hosted-login/okta-blazor-server-side-example/wwwroot/css/open-iconic/font/fonts/open-iconic.eot b/server-side/okta-hosted-login/okta-blazor-server-side-example/wwwroot/css/open-iconic/font/fonts/open-iconic.eot deleted file mode 100644 index f98177d..0000000 Binary files a/server-side/okta-hosted-login/okta-blazor-server-side-example/wwwroot/css/open-iconic/font/fonts/open-iconic.eot and /dev/null differ diff --git a/server-side/okta-hosted-login/okta-blazor-server-side-example/wwwroot/css/open-iconic/font/fonts/open-iconic.otf b/server-side/okta-hosted-login/okta-blazor-server-side-example/wwwroot/css/open-iconic/font/fonts/open-iconic.otf deleted file mode 100644 index f6bd684..0000000 Binary files a/server-side/okta-hosted-login/okta-blazor-server-side-example/wwwroot/css/open-iconic/font/fonts/open-iconic.otf and /dev/null differ diff --git a/server-side/okta-hosted-login/okta-blazor-server-side-example/wwwroot/css/open-iconic/font/fonts/open-iconic.svg b/server-side/okta-hosted-login/okta-blazor-server-side-example/wwwroot/css/open-iconic/font/fonts/open-iconic.svg deleted file mode 100644 index 32b2c4e..0000000 --- a/server-side/okta-hosted-login/okta-blazor-server-side-example/wwwroot/css/open-iconic/font/fonts/open-iconic.svg +++ /dev/null @@ -1,543 +0,0 @@ - - - - - -Created by FontForge 20120731 at Tue Jul 1 20:39:22 2014 - By P.J. Onori -Created by P.J. Onori with FontForge 2.0 (http://fontforge.sf.net) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/server-side/okta-hosted-login/okta-blazor-server-side-example/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf b/server-side/okta-hosted-login/okta-blazor-server-side-example/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf deleted file mode 100644 index fab6048..0000000 Binary files a/server-side/okta-hosted-login/okta-blazor-server-side-example/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf and /dev/null differ diff --git a/server-side/okta-hosted-login/okta-blazor-server-side-example/wwwroot/css/open-iconic/font/fonts/open-iconic.woff b/server-side/okta-hosted-login/okta-blazor-server-side-example/wwwroot/css/open-iconic/font/fonts/open-iconic.woff deleted file mode 100644 index f930998..0000000 Binary files a/server-side/okta-hosted-login/okta-blazor-server-side-example/wwwroot/css/open-iconic/font/fonts/open-iconic.woff and /dev/null differ diff --git a/server-side/okta-hosted-login/okta-blazor-server-side-example/wwwroot/favicon.ico b/server-side/okta-hosted-login/okta-blazor-server-side-example/wwwroot/favicon.ico deleted file mode 100644 index 63e859b..0000000 Binary files a/server-side/okta-hosted-login/okta-blazor-server-side-example/wwwroot/favicon.ico and /dev/null differ diff --git a/server-side/okta-hosted-login/okta-blazor-server-side-example/wwwroot/favicon.png b/server-side/okta-hosted-login/okta-blazor-server-side-example/wwwroot/favicon.png new file mode 100644 index 0000000..8422b59 Binary files /dev/null and b/server-side/okta-hosted-login/okta-blazor-server-side-example/wwwroot/favicon.png differ