-
Notifications
You must be signed in to change notification settings - Fork 496
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add token auth to dashboard frontend #3213
Merged
+3,095
−156
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
<svg width="@Height" height="@Width" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> | ||
<mask id="mask0_449_831" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="24" height="22"> | ||
<path fill-rule="evenodd" clip-rule="evenodd" d="M5.39001 12C4.49001 12 3.67 12.4799 3.22 13.2499L6.67 7.27994L6.6817 7.25982L9.84001 1.79005C10.05 1.43005 10.36 1.11005 10.75 0.880049C11.14 0.650049 11.57 0.550049 12 0.550049C12.86 0.550049 13.7 0.990049 14.17 1.80005L17.33 7.28005L23.67 18.25C23.88 18.62 24 19.05 24 19.5C24 20.88 22.88 22 21.5 22H8.27002C8.27001 22 8.27002 22 8.27002 22H2.5C1.12 22 0 20.88 0 19.5C0 19.05 0.12 18.62 0.33 18.25L3.22 13.2499C3.67 12.4799 4.49001 12 5.39001 12C5.39002 12 5.39001 12 5.39001 12Z" fill="url(#paint0_linear_449_831)" /> | ||
</mask> | ||
<g mask="url(#mask0_449_831)"> | ||
<path d="M20.06 12H13.72L11 7.28005C10.79 6.91005 10.48 6.59005 10.08 6.37005C8.88998 5.67005 7.35998 6.08005 6.66998 7.28005L9.83998 1.79005C10.05 1.43005 10.36 1.11005 10.75 0.880049C11.14 0.650049 11.57 0.550049 12 0.550049C12.86 0.550049 13.7 0.990049 14.17 1.80005L17.33 7.28005L20.06 12Z" fill="url(#paint1_linear_449_831)" /> | ||
<g filter="url(#filter0_dd_449_831)"> | ||
<path d="M5.38997 11.9999H13.72L11 7.27994C10.79 6.90994 10.48 6.58994 10.08 6.36994C8.88997 5.66994 7.35997 6.07994 6.66997 7.27994L3.21997 13.2499C3.66997 12.4799 4.48997 11.9999 5.38997 11.9999Z" fill="url(#paint2_linear_449_831)" /> | ||
<path d="M21.5 22C22.88 22 24 20.88 24 19.5C24 19.05 23.88 18.62 23.67 18.25L20.06 12L13.72 11.9999L17.33 18.25C17.55 18.62 17.67 19.05 17.67 19.5C17.67 20.88 16.55 22 15.17 22H21.5Z" fill="url(#paint3_linear_449_831)" /> | ||
</g> | ||
<g filter="url(#filter1_dd_449_831)"> | ||
<path d="M17.67 19.5C17.67 20.88 16.55 22 15.17 22H8.27002C9.65002 22 10.77 20.88 10.77 19.5C10.77 19.05 10.65 18.62 10.44 18.25L7.55001 13.25C7.52002 13.19 7.48001 13.14 7.44001 13.08C6.99001 12.42 6.23001 12 5.39001 12H13.72L17.33 18.25C17.55 18.62 17.67 19.05 17.67 19.5Z" fill="url(#paint4_linear_449_831)" /> | ||
</g> | ||
<g filter="url(#filter2_dd_449_831)"> | ||
<path d="M10.77 19.5C10.77 20.88 9.65 22 8.27 22H2.5C1.12 22 0 20.88 0 19.5C0 19.05 0.12 18.62 0.33 18.25L3.22 13.25C3.67 12.48 4.49 12 5.39 12C6.23 12 6.99 12.42 7.44 13.08C7.48 13.14 7.52 13.19 7.55 13.25L10.44 18.25C10.65 18.62 10.77 19.05 10.77 19.5Z" fill="url(#paint5_linear_449_831)" /> | ||
</g> | ||
</g> | ||
<defs> | ||
<filter id="filter0_dd_449_831" x="1.21997" y="4.52808" width="24.78" height="19.9719" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"> | ||
<feFlood flood-opacity="0" result="BackgroundImageFix" /> | ||
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha" /> | ||
<feOffset dy="0.095" /> | ||
<feGaussianBlur stdDeviation="0.095" /> | ||
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.24 0" /> | ||
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_449_831" /> | ||
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha" /> | ||
<feOffset dy="0.5" /> | ||
<feGaussianBlur stdDeviation="1" /> | ||
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.32 0" /> | ||
<feBlend mode="normal" in2="effect1_dropShadow_449_831" result="effect2_dropShadow_449_831" /> | ||
<feBlend mode="normal" in="SourceGraphic" in2="effect2_dropShadow_449_831" result="shape" /> | ||
</filter> | ||
<filter id="filter1_dd_449_831" x="3.39001" y="10.5" width="16.28" height="14" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"> | ||
<feFlood flood-opacity="0" result="BackgroundImageFix" /> | ||
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha" /> | ||
<feOffset dy="0.095" /> | ||
<feGaussianBlur stdDeviation="0.095" /> | ||
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.24 0" /> | ||
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_449_831" /> | ||
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha" /> | ||
<feOffset dy="0.5" /> | ||
<feGaussianBlur stdDeviation="1" /> | ||
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.32 0" /> | ||
<feBlend mode="normal" in2="effect1_dropShadow_449_831" result="effect2_dropShadow_449_831" /> | ||
<feBlend mode="normal" in="SourceGraphic" in2="effect2_dropShadow_449_831" result="shape" /> | ||
</filter> | ||
<filter id="filter2_dd_449_831" x="-2" y="10.5" width="14.77" height="14" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"> | ||
<feFlood flood-opacity="0" result="BackgroundImageFix" /> | ||
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha" /> | ||
<feOffset dy="0.095" /> | ||
<feGaussianBlur stdDeviation="0.095" /> | ||
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.24 0" /> | ||
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_449_831" /> | ||
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha" /> | ||
<feOffset dy="0.5" /> | ||
<feGaussianBlur stdDeviation="1" /> | ||
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.32 0" /> | ||
<feBlend mode="normal" in2="effect1_dropShadow_449_831" result="effect2_dropShadow_449_831" /> | ||
<feBlend mode="normal" in="SourceGraphic" in2="effect2_dropShadow_449_831" result="shape" /> | ||
</filter> | ||
<linearGradient id="paint0_linear_449_831" x1="1.88475" y1="11.1667" x2="10.31" y2="23.1443" gradientUnits="userSpaceOnUse"> | ||
<stop stop-color="#CBBFF2" /> | ||
<stop offset="1" stop-color="#B9AAEE" /> | ||
</linearGradient> | ||
<linearGradient id="paint1_linear_449_831" x1="9.6127" y1="-0.685575" x2="16.8764" y2="13.8912" gradientUnits="userSpaceOnUse"> | ||
<stop stop-color="#7455DD" /> | ||
<stop stop-color="#6745DA" /> | ||
<stop offset="1" stop-color="#512BD4" /> | ||
</linearGradient> | ||
<linearGradient id="paint2_linear_449_831" x1="7.90532" y1="3.78438" x2="19.1767" y2="23.0023" gradientUnits="userSpaceOnUse"> | ||
<stop stop-color="#856AE1" /> | ||
<stop offset="1" stop-color="#7455DD" /> | ||
</linearGradient> | ||
<linearGradient id="paint3_linear_449_831" x1="7.90532" y1="3.78438" x2="19.1767" y2="23.0023" gradientUnits="userSpaceOnUse"> | ||
<stop stop-color="#856AE1" /> | ||
<stop offset="1" stop-color="#7455DD" /> | ||
</linearGradient> | ||
<linearGradient id="paint4_linear_449_831" x1="5.4257" y1="9.22222" x2="13.2216" y2="21.4193" gradientUnits="userSpaceOnUse"> | ||
<stop stop-color="#A895E9" /> | ||
<stop offset="1" stop-color="#9780E5" /> | ||
</linearGradient> | ||
<linearGradient id="paint5_linear_449_831" x1="1.88475" y1="11.1667" x2="10.31" y2="23.1443" gradientUnits="userSpaceOnUse"> | ||
<stop stop-color="#CBBFF2" /> | ||
<stop offset="1" stop-color="#B9AAEE" /> | ||
</linearGradient> | ||
</defs> | ||
</svg> | ||
|
||
@code { | ||
[Parameter] | ||
public int Height { get; set; } = 24; | ||
|
||
[Parameter] | ||
public int Width { get; set; } = 24; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
@inherits LayoutComponentBase | ||
@Body | ||
<FluentTooltipProvider /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
@page "/login" | ||
@using Aspire.Dashboard.Utils | ||
@layout EmptyLayout | ||
@attribute [AllowAnonymous] | ||
@inject IStringLocalizer<Dashboard.Resources.Login> Loc | ||
|
||
<PageTitle><ApplicationName ResourceName="@nameof(Dashboard.Resources.Login.PageTitle)" Loc="@Loc" /></PageTitle> | ||
|
||
<div class="token-backdrop"> | ||
<EditForm EditContext="@EditContext" OnValidSubmit="@SubmitAsync" FormName="token_validation"> | ||
<DataAnnotationsValidator /> | ||
<div class="token-form-container"> | ||
<div class="token-logo"> | ||
<AspireLogo Height="128" Width="128" /> | ||
JamesNK marked this conversation as resolved.
Show resolved
Hide resolved
|
||
</div> | ||
<div class="token-entry-container"> | ||
<div class="token-entry-header"> | ||
<h1><ApplicationName ResourceName="@nameof(Dashboard.Resources.Login.Header)" Loc="@Loc" /></h1> | ||
</div> | ||
<div class="token-entry"> | ||
<FluentTextField @ref="_tokenTextField" Id="token-text-field" @bind-Value="_formModel.Token" | ||
Placeholder="@Loc[nameof(Dashboard.Resources.Login.TextFieldPlaceholder)]" | ||
TextFieldType="TextFieldType.Password" Class="token-entry-text" /> | ||
</div> | ||
<div class="token-validation"> | ||
<FluentValidationMessage For="() => _formModel.Token" /> | ||
</div> | ||
<div class="token-entry-footer"> | ||
<a href="javascript:;" id="helpLink">@Loc[nameof(Dashboard.Resources.Login.WhereIsMyTokenLinkText)]</a> | ||
<FluentButton Appearance="Appearance.Accent" Type="ButtonType.Submit">@Loc[nameof(Dashboard.Resources.Login.LogInButtonText)]</FluentButton> | ||
<FluentTooltip Anchor="helpLink" Position="TooltipPosition.Bottom"> | ||
<div class="token-help-container"> | ||
<div class="token-help-text">@Loc[nameof(Dashboard.Resources.Login.HelpPopupText)]</div> | ||
<img class="token-help-image" src="/img/TokenExample.png" | ||
alt="@Loc[nameof(Dashboard.Resources.Login.HelpScreenshotAltText)]" /> | ||
<FluentAnchor Href="https://go.microsoft.com/fwlink/?linkid=2265718" Target="_blank" | ||
Appearance="Appearance.Hypertext"> | ||
@Loc[nameof(Dashboard.Resources.Login.MoreInfoLinkText)] | ||
</FluentAnchor> | ||
</div> | ||
</FluentTooltip> | ||
</div> | ||
</div> | ||
</div> | ||
</EditForm> | ||
<div class="version-info"> | ||
@VersionHelpers.DashboardDisplayVersion | ||
</div> | ||
</div> |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this code keep track of the last successful key and check it first?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why should it?