Skip to content

Commit 21d62d3

Browse files
committed
Report token expiration time
1 parent 000e8c6 commit 21d62d3

File tree

1 file changed

+13
-0
lines changed
  • src/Components/Blazor/testassets/Wasm.Authentication.Client/Pages

1 file changed

+13
-0
lines changed

src/Components/Blazor/testassets/Wasm.Authentication.Client/Pages/User.razor

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,19 @@
2121
<p>@(claim.Key): @claim.Value.ToString()</p>
2222
}
2323

24+
@if (AccessToken != null)
25+
{
26+
<h2>Current time: @DateTimeOffset.Now</h2>
27+
<h2>Access token expires</h2>
28+
<p>@AccessToken.Expires</p>
29+
30+
<h2>Access token granted scopes (as reported by the API)</h2>
31+
@foreach (var scope in AccessToken.GrantedScopes)
32+
{
33+
<p>Scope: @scope</p>
34+
}
35+
}
36+
2437
@code {
2538
[CascadingParameter] private Task<AuthenticationState> AuthenticationState { get; set; }
2639

0 commit comments

Comments
 (0)