-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New page for easily finding the Urls for localtest ApiTokens
- Loading branch information
Showing
9 changed files
with
154 additions
and
25 deletions.
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,11 @@ | ||
#nullable enable | ||
using Microsoft.AspNetCore.Mvc.Rendering; | ||
|
||
namespace LocalTest.Models; | ||
|
||
public class TokensViewModel | ||
{ | ||
public required IEnumerable<SelectListItem> TestUsers { get; init; } = default!; | ||
public required List<SelectListItem> AuthenticationLevels { get; init; } = default!; | ||
public required string DefaultOrg { get; init; } | ||
} |
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
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,55 @@ | ||
@model TokensViewModel | ||
@{ | ||
ViewData["Title"] = "Tokens for localtest"; | ||
} | ||
<div class="text-center"> | ||
<h1 class="display-4">Welcome to Altinn App Local Testing</h1> | ||
<p>Create tokens for accessing the localtest apis.</p> | ||
|
||
<div class="alert alert-warning">Note that LocalTest is not an exact replica of the production systems, and that there are differences</div> | ||
|
||
<h2>Generate end users token (like from idporten)</h2> | ||
@using (Html.BeginForm("GetTestUserToken", "Home", FormMethod.Get, new { Class = "form" })) | ||
{ | ||
<div class="form-group"> | ||
<label>Select user</label> | ||
@Html.DropDownList("userId", Model.TestUsers, new { Class = "form-control" }) | ||
</div> | ||
<div class="form-group"> | ||
<label>Select your authentication level</label> | ||
@Html.DropDownList("authenticationLevel", Model.AuthenticationLevels, new { Class = "form-control" }) | ||
</div> | ||
|
||
<div class="form-group"> | ||
<button type="submit" class="btn btn-primary">Get User token</button> | ||
</div> | ||
} | ||
<h2>Service owner tokens</h2> | ||
|
||
@using (Html.BeginForm("GetTestOrgToken", "Home", FormMethod.Get, new { Class = "form-signin" })) | ||
{ | ||
<div class="form-group"> | ||
<label>Select service owner org</label> | ||
@Html.TextBox("org", Model.DefaultOrg, new { Class = "form-control" }) | ||
</div> | ||
<div class="form-group"> | ||
<label>optional org number for the token</label> | ||
@Html.TextBox("orgNumber", "", new { Class = "form-control", Placeholder = "For official orgs this is fetch from altinncdn.no" }) | ||
</div> | ||
<div class="form-group"> | ||
<label>Select your authentication level</label> | ||
@Html.DropDownList("authenticationLevel", Model.AuthenticationLevels, new { Class = "form-control" }) | ||
</div> | ||
|
||
<div class="form-group"> | ||
<button type="submit" class="btn btn-primary">Get User token</button> | ||
</div> | ||
} | ||
</div> | ||
|
||
@section Styles | ||
{ | ||
<style> | ||
</style> | ||
} |
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 |
---|---|---|
|
@@ -6,6 +6,7 @@ | |
<title>@ViewData["Title"] - Altinn Studio</title> | ||
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous"> | ||
<link rel="stylesheet" href="~/localtestresources/css/site.css" /> | ||
@RenderSection("Styles", required: false) | ||
</head> | ||
<body> | ||
<header> | ||
|
@@ -29,6 +30,10 @@ | |
<a class="nav-link text-secondary" asp-area="" asp-controller="TenorUsers" | ||
asp-action="Index">User administration</a> | ||
</li> | ||
<li class="nav-item"> | ||
<a class="nav-link text-dark" asp-area="" asp-controller="Home" | ||
asp-action="Tokens">Tokens</a> | ||
</li> | ||
<li class="nav-item"> | ||
<a class="nav-link text-dark" asp-area="" asp-controller="StorageExplorer" asp-action="Index">Storage Explorer</a> | ||
</li> | ||
|