Skip to content

Missing IdentityServerLicense class #6

Description

@wsigel

Following the approach in module 3 after creating the ui with "dotnet new isui" the generated Pages-Folder contains an
Index.cshtml.cs file with the following content:

`using Duende.IdentityServer;
using System.Reflection;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc.RazorPages;

namespace Marvin.IDP.Pages.Home;

[AllowAnonymous]
public class Index : PageModel
{
public Index(IdentityServerLicense? license = null)
{
License = license;
}

public string Version
{
    get => typeof(Duende.IdentityServer.Hosting.IdentityServerMiddleware).Assembly
        .GetCustomAttribute<AssemblyInformationalVersionAttribute>()
        ?.InformationalVersion.Split('+').First()
        ?? "unavailable";
}
public IdentityServerLicense? License { get; }

}`

However the class 'IdentityServerLicense' is nowhere to be found so the project Marvin.IDP doesn't compile.

Also the mentioned dotnet command created a Pages => Account =>Create Folder in which another Index.cshtml.cs file
mentioned a missing:

var user = _users.CreateUser(Input.Username, Input.Password, Input.Name, Input.Email);

I only got the example running by:

  1. deleting the folder Pages => Account =>Create
  2. by commenting out the Index constructor and the property mentioned above
  3. by commenting out the references to the Model.License in the Index.cshtml in the Pages folder

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions