adding security

This commit is contained in:
Frank
2021-06-06 13:34:07 -04:00
parent b83370cf37
commit 2a52b82e0e
10 changed files with 149 additions and 19 deletions
+20
View File
@@ -0,0 +1,20 @@
@page "/secured"
@using Microsoft.AspNetCore.Authorization
@inject HttpClient Http
@attribute [Authorize(Roles = "admin")]
<h1>Azure Function Test</h1>
<h2>@result</h2>
@code {
private string result = "temp value";
protected override async Task OnInitializedAsync()
{
var response = await Http.GetStringAsync("/api/secured/HelloYou?name=cloudies");
result = response.ToString();
}
}