Giter VIP home page Giter VIP logo

identityserver4.admin's Introduction

Hi there πŸ‘‹

I'm Jan Ε koruba. I am working on open source projects primary related to identity and access control.

I am interested in @openid πŸ” β€’ @oauth2 πŸ”’ β€’ @dotnet πŸš€ β€’ @reactjs βš›

Support me πŸš€

It makes me so happy to see that my projects interest someone else and together we are building something useful.

If you like my work you can support me by donation on paypal or patreon. Thank you. πŸ‘

identityserver4.admin's People

Contributors

aegide avatar aiscrim avatar alev7ina avatar b0 avatar bravecobra avatar dependabot[bot] avatar duki994 avatar ekjuanrejon avatar ioxfr avatar jonasbrasmussen avatar joshua-p-williams avatar killerrin avatar klyse avatar martinussuherman avatar pavel-usachev avatar pbros avatar saeedrahmo avatar seaear avatar sheng-jie avatar sindrenj avatar skoruba avatar svendu avatar tancevsasa avatar tapmui avatar tomashubelbauer avatar virustrinity avatar walid-abdulrazik avatar xmichaelx avatar zinkpad avatar zyxious avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

identityserver4.admin's Issues

Using SQLite as default database engine

A modest suggestion. By default Admin uses SqlServer which has to be separately installed for anyone who doesn't use Visual Studio daily.

Required changes would be pretty small:

UseSqlServer -> UseSqlite in StartupHelpers.cs and adding SQLite provider package for EntityFramework.Core.

I myself use PostgreSQL (works great), but for demonstration purposes I think SQLite would the best choice. This would also make checking out the Admin so much easier for Linux/MacOS folks.

Fix that "Allowed Scopes" and "Allowed Grant Types" cannot be displayed properly in Client Basics when published as an application

Hello, I am very glad that you have developed this system. I think it is perfect to improve it here

change

<picker id="AllowedScopesItems" multiple-select="true" min-search-text="2"
        selected-items="@Model.AllowedScopes" url="/Configuration/SearchScopes?scope"
        search-input-placeholder="Enter 2 and more characters" selected-items-title="Selected: ">
</picker>

to

<picker id="AllowedScopesItems" multiple-select="true" min-search-text="2"
        selected-items="@Model.AllowedScopes" url="@Url.Action("SearchScopes","Configuration")?scope"
        search-input-placeholder="Enter 2 and more characters" selected-items-title="Selected: ">
</picker>

NOT PERFECT: url="/Configuration/SearchScopes?scope"
PERFECT: url="@Url.Action("SearchScopes","Configuration")?scope"

There are a few other places I didn't list

Use in existing IdentityServer setup

For people having identity server running already, any plans on making a guide on how to get this awesome Admin UI to work?

Maybe there has to be some work done with exposing setup options like naming, using existing dbcontexts etc.

Create a documentation

Consider:

  • How to create a documentation - what document format to use

  • Use Github or some external tool

Any suggestions?

How to use Multiple DbContexts ?

Hi @skoruba ,

How to use Multiple DbContexts with multiple Databases ? I want to use :

  • 1 database for Clients, ApiScopes, ApiResources, PersistedGrants ...
  • 1 database for Users, Roles, UserClaims ...

I have created a new DbContext (AuthDbContext) but i'm confused how to get it work :/

Any idea ? ^_^

Some const field can read *.settings.json

Some information changes in environments.
For example;

    public const string IdentityAdminCookieName = "IdentityServerAdmin";        
    public const string IdentityAdminRedirectUri = "http://localhost:9000/signin-oidc";
    public const string IdentityServerBaseUrl = "https://devauth.thyteknik.com.tr";
    public const string IdentityAdminBaseUrl = "http://localhost:9000";

The application can take this changing information from the setting.json file.
If you check the issue, I can do it.

PasswordHash is set to NULL when saving user settings

Hi,

ran into a bug, when saving user settings from /Identity/UserProfile/X - password of a user is set to NULL (PasswordHash field in dbo.Users). Everything else saves normally.
Maybe some mapping issue?

Best regards.

'xml' Column Type on 'Log' entity incompatible with EntityFramework MySql

Hi

First off - great project...

.. but there's a but... We'd prefer to use MySql for the backend database, however the use of the 'xml' column type in the model annotations forces the use of an underlying database engine that supports that specific column type.

For now i've got around this by overriding the AdminDbContext with my own which replaces the xml column type with one compatible with MySql in the ModelBuilder (OnModelCreating) (see below)

using IdentityServer4.EntityFramework.Entities;
using IdentityServer4.EntityFramework.Extensions;
using IdentityServer4.EntityFramework.Options;
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
using Skoruba.IdentityServer4.Admin.EntityFramework.Identity.Constants;
using Skoruba.IdentityServer4.Admin.EntityFramework.Entities;
using Skoruba.IdentityServer4.Admin.EntityFramework.Identity.Entities.Identity;
using Skoruba.IdentityServer4.Admin.EntityFramework.Identity.Interfaces;
using Skoruba.IdentityServer4.Admin.EntityFramework.Interfaces;
using System.Threading.Tasks;
using TableConst = Skoruba.IdentityServer4.Admin.EntityFramework.Constants;

namespace Identity.Server.EntityFramework
{
    public class AdminDbContext : IdentityDbContext<UserIdentity, UserIdentityRole, int, UserIdentityUserClaim, UserIdentityUserRole, UserIdentityUserLogin, UserIdentityRoleClaim, UserIdentityUserToken>,
        IAdminConfigurationDbContext, IAdminLogDbContext, IAdminPersistedGrantDbContext, IAdminPersistedGrantIdentityDbContext
    {
        private readonly ConfigurationStoreOptions _storeOptions;
        private readonly OperationalStoreOptions _operationalOptions;

        public AdminDbContext(DbContextOptions<AdminDbContext> options,
            ConfigurationStoreOptions storeOptions,
                OperationalStoreOptions operationalOptions)
            : base(options)
        {
            _storeOptions = storeOptions;
            _operationalOptions = operationalOptions;
        }

        public DbSet<ApiResource> ApiResources { get; set; }

        public DbSet<IdentityResource> IdentityResources { get; set; }

        public DbSet<ApiSecret> ApiSecrets { get; set; }

        public DbSet<ApiScope> ApiScopes { get; set; }

        public DbSet<ApiScopeClaim> ApiScopeClaims { get; set; }

        public DbSet<IdentityClaim> IdentityClaims { get; set; }

        public DbSet<ApiResourceClaim> ApiResourceClaims { get; set; }

        public DbSet<Client> Clients { get; set; }

        public DbSet<ClientGrantType> ClientGrantTypes { get; set; }

        public DbSet<ClientScope> ClientScopes { get; set; }

        public DbSet<ClientSecret> ClientSecrets { get; set; }

        public DbSet<ClientPostLogoutRedirectUri> ClientPostLogoutRedirectUris { get; set; }

        public DbSet<ClientCorsOrigin> ClientCorsOrigins { get; set; }

        public DbSet<ClientIdPRestriction> ClientIdPRestrictions { get; set; }

        public DbSet<ClientRedirectUri> ClientRedirectUris { get; set; }

        public DbSet<ClientClaim> ClientClaims { get; set; }

        public DbSet<ClientProperty> ClientProperties { get; set; }

        public DbSet<PersistedGrant> PersistedGrants { get; set; }

        public DbSet<Log> Logs { get; set; }

        public Task<int> SaveChangesAsync()
        {
            return base.SaveChangesAsync();
        }

        protected override void OnModelCreating(ModelBuilder builder)
        {
            base.OnModelCreating(builder);

            ConfigureIdentityContext(builder);
            ConfigureLogContext(builder);
            builder.ConfigureClientContext(_storeOptions);
            builder.ConfigureResourcesContext(_storeOptions);
            builder.ConfigurePersistedGrantContext(_operationalOptions);
        }

        private void ConfigureLogContext(ModelBuilder builder)
        {
            builder.Entity<Log>(log =>
            {
                log.ToTable(TableConst.TableConsts.Logging);
                log.HasKey(x => x.Id);
                log.Property(x => x.Properties).HasColumnType("longtext");
                log.Property(x => x.Level).HasMaxLength(128);
            });
        }

        private void ConfigureIdentityContext(ModelBuilder builder)
        {
            builder.Entity<UserIdentityRole>().ToTable(TableConsts.IdentityRoles);
            builder.Entity<UserIdentityRoleClaim>().ToTable(TableConsts.IdentityRoleClaims);
            builder.Entity<UserIdentityUserRole>().ToTable(TableConsts.IdentityUserRoles);

            builder.Entity<UserIdentity>().ToTable(TableConsts.IdentityUsers);
            builder.Entity<UserIdentityUserLogin>().ToTable(TableConsts.IdentityUserLogins);
            builder.Entity<UserIdentityUserClaim>().ToTable(TableConsts.IdentityUserClaims);
            builder.Entity<UserIdentityUserToken>().ToTable(TableConsts.IdentityUserTokens);
        }
    }
}

Just an fyi really.

Cheers!

Add/Edit problem, Client Redirect Uris

In Admin UI under client Basic settings, Adding or Editing Redirect Uris does not work.

Similar problem with other field of same where adding Uri or Editing is not working.

Keep it up.
error

Add IdentityServer4.Admin.Common project

Add IdentityServer4.Admin.Common project for common interfaces, constants, DTOs, AppSettings.
Move non specific for App, DAL and BLL constants and DTOs to Common project.

Might be must have refactoring for #56

Request: Add the user provision to the DI pipeline

I'd like to see the methods to provision users (i.e. AutoProvisionUserAsync etc) in a separate implementation having the Skoruba-implementation as default but allowing us to replace it when needed. It is rather impractical having to modify the AccountController after every update.

Multitenant support

Hello,

First of all, nice job. Really useful and clear admin UI for IS4.

Any plan to support multi-tenant identity strategies? I know that is not an easy architecture, but it has become very popular concept (and we use it in our service model :) )

Would you consider adding this feature?

I would be willing to help.

Serilog integration

IdentityServer4 authors "kind of recommend" to use Serilog http://docs.identityserver.io/en/release/topics/logging.html
https://github.com/serilog

Serilog has basic sinks for
File (https://github.com/serilog/serilog-sinks-file)
Database (https://github.com/serilog/serilog-sinks-mssqlserver)
and enterprise level sinks for Splunk, Azure AppInsights, ElasticSearch etc.

Also Enrichers concept allows to customize on DI container level tracking properties.

I would use Serilog to log into existing Log table in Admin context,
and add Logging configuration section to appsettings.json with sinks configurations.

Add audit tables to track IdSrv configuration data changes

During administration clients, scopes, users, roles may be important to have control on it's history.

One of the cheap way to get changes history could be SQL server Track Data Changes feature.

  1. Add feature for SQL server
    https://docs.microsoft.com/en-us/sql/relational-databases/track-changes/enable-and-disable-change-data-capture-sql-server?view=sql-server-2017
  2. Add views to read tracking changes tables and build around them AuditDbContext.

Second options is to realize it on application level by using EF handlers and changetracker.
https://blog.tonysneed.com/2017/10/01/trackable-entities-for-ef-core/

Add flag for exluding Asp.Net Core Identity from dotnet new template

Currently dotnet new template contains following params:

dotnet new skoruba.is4admin 
--name MyProject 
--title MyProject 
--adminrole MyRole 
--adminclientid MyClientId

It's necesarry to add the flag --exludeAspNetIdentity for exluding Asp.Net Core Identity from template.

encapsulate project to injectable parts

I'm wondering if it is possible to change the structure of this project to two different projects(or nuget packages would be better).

  • IdentityServer4.Admin
    this project will register all operations to a specific endpoint(like "/identity-server-admin") as a rest api.

  • IdentityServer4.Admin.UI
    this project will register all default page to a specific endpoint(like "/identity-server-admin-ui") and it would be possible to inject some css or js or something.

Just like what swagger&swagger-ui has done.

Besides, thanks for your huge efforts for this repo.

Introduce AppSettings based on IOptions aspnetcore feature

Actually AdminUI IdSrv4 intergation and authorization params configured in AuthorizationConsts:

        public const string AdministrationPolicy = "RequireAdministratorRole";
        public const string AdministrationRole = "PlutoRootAdministrator";
        public const string IdentityAdminCookieName = "IdentityServerAdmin";        
        public const string IdentityAdminRedirectUri = "http://localhost:9000/signin-oidc";
        public const string IdentityServerBaseUrl = "https://localhost:44301/idsrv";
        public const string IdentityAdminBaseUrl = "http://localhost:9000";

I would suggest to use AppSettings class for that, which mapped to appsettings section in appsettings.JSON and IAppSettings rigistered as dependency in DI container.

Detailed about IOptions<TSettings> aspnetcore feature here:
https://joonasw.net/view/asp-net-core-1-configuration-deep-dive

services.AddOptions();
services.Configure<MySettings>(Configuration.GetSection("MySettings"));

No binding between pickers and ViewModels

I can't find any connection between MVC ViewModel and your KO pickers. params.hiddenId is undefined.

<div class="form-group row">
		<label asp-for="AllowedCorsOrigins" class="col-sm-3 col-form-label">
			@await Html.PartialAsync("Client/Section/Label", "AllowedCorsOrigins")
		</label>
	    <div class="col-sm-9">
	        <picker param="multipleSelect=true; hiddenId=AllowedCordOrigins" id="AllowedCorsOriginsItems" multiple-select="true" min-search-text="2"
	                selected-items="@Model.AllowedCorsOrigins" search-input-placeholder="Enter 2 and more characters 1"
	                selected-items-title="Selected: ">
	        </picker>
	    </div>
	</div>

You have multiple attributes for picker, but no params attr. What am I missing?

How can I login?

It seems there is no default admin/admin user or something else like for login page.
Follow the step,

  1. add-migrations
  2. datebase update
  3. uncomment seeddata

Then I start IDS4 at localhost:5000, and IDS4 admin at localhost:9000.
Where I open http://localhost:9000, the website redirect me to localhost:5000 login page.
But I don't have a username and password for login.
User table is empty when I check it in SQL Server Management Studio.
Is it something I have done wrong?

How to handle multiple roles for same user and Authorize an api

Hello Skoruba ,
Thanks for this nice project it helps a lot

But am having two issues

  1. is how can allow multiple roles for a single user , this comes i hand when i have more than one application where user can be able to share the login i tried to implement but it ends up in access denied page failing to authorize the user

  2. what are the best way to authorize the API, i tried to implement but it works only on first minute after first minute the API loses access hence preventing user to have access to an API and the refresh token is invalid and throws an error when i try to renew the access token using the refresh token

Add Breadcrumb in Layout

If you are client editting page, you don't go back client list. Maybe breadcrumb is good for the project.

Use mysql when using template

Hello

I am following the instructions to create a brand new project using the templates.

My problem is that I want to be able to use MySql. How can I change Log.cs

Connecting sample IS to database managed by IdentityServer4.Admin

Hello,

First of all, big thanks for doing this. You saved me a tremendous amount of work.

Why haven't you connected IdentityServer4 to the database modified by Admin panel? I understand that you could've done for the sake of simplicity and that's why you've opted for in memory stores but I'm curious if there's any other reason.

I'm working on having IS from Skoruba.IdentityServer4 connected to database modified in Skoruba.IdentityServer4.Admin. If I connect them are you interested in a pull request?

Refresh Token after User Changes Role

Hi,
First, thank you for this great job I appreciate it a lot :) . My question is :
The user remains logged in and accesses AdminUI when I delete the Role, How to block access or redirect to an error page?
Thank you :)

Table 'ApiResources' already exists

Thanks for such a great project.

I have an issue while migrating database.

First of all, I followed the instruction in EFMigration.md and Issue102 to use MySQL. When I run Update-Database -context AdminDbContext, I got

PM> dotnet ef database update -c AdminDbContext MySql.Data.MySqlClient.MySqlException (0x80004005): Table 'ApiResources' already exists ---> MySql.Data.MySqlClient.MySqlException (0x80004005): Table 'ApiResources' already exists at MySqlConnector.Core.ResultSet.ReadResultSetHeaderAsync(IOBehavior ioBehavior) in C:\projects\mysqlconnector\src\MySqlConnector\Core\ResultSet.cs:line 42 at MySql.Data.MySqlClient.MySqlDataReader.ActivateResultSet(ResultSet resultSet) in C:\projects\mysqlconnector\src\MySqlConnector\MySql.Data.MySqlClient\MySqlDataReader.cs:line 74 at MySql.Data.MySqlClient.MySqlDataReader.ReadFirstResultSetAsync(IOBehavior ioBehavior) in C:\projects\mysqlconnector\src\MySqlConnector\MySql.Data.MySqlClient\MySqlDataReader.cs:line 299 at MySql.Data.MySqlClient.MySqlDataReader.CreateAsync(MySqlCommand command, CommandBehavior behavior, ResultSetProtocol resultSetProtocol, IOBehavior ioBehavior) in C:\projects\mysqlconnector\src\MySqlConnector\MySql.Data.MySqlClient\MySqlDataReader.cs:line 284 at MySqlConnector.Core.TextCommandExecutor.ExecuteReaderAsync(String commandText, MySqlParameterCollection parameterCollection, CommandBehavior behavior, IOBehavior ioBehavior, CancellationToken cancellationToken) in C:\projects\mysqlconnector\src\MySqlConnector\Core\TextCommandExecutor.cs:line 37 at MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQueryAsync(IOBehavior ioBehavior, CancellationToken cancellationToken) in C:\projects\mysqlconnector\src\MySqlConnector\MySql.Data.MySqlClient\MySqlCommand.cs:line 261 at MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuery() in C:\projects\mysqlconnector\src\MySqlConnector\MySql.Data.MySqlClient\MySqlCommand.cs:line 62 at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.Execute(IRelationalConnection connection, DbCommandMethod executeMethod, IReadOnlyDictionary2 parameterValues)
at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.ExecuteNonQuery(IRelationalConnection connection, IReadOnlyDictionary2 parameterValues) at Microsoft.EntityFrameworkCore.Migrations.MigrationCommand.ExecuteNonQuery(IRelationalConnection connection, IReadOnlyDictionary2 parameterValues)
at Microsoft.EntityFrameworkCore.Migrations.Internal.MigrationCommandExecutor.ExecuteNonQuery(IEnumerable1 migrationCommands, IRelationalConnection connection) at Microsoft.EntityFrameworkCore.Migrations.Internal.Migrator.Migrate(String targetMigration) at Microsoft.EntityFrameworkCore.Design.Internal.MigrationsOperations.UpdateDatabase(String targetMigration, String contextType) at Microsoft.EntityFrameworkCore.Design.OperationExecutor.UpdateDatabase.<>c__DisplayClass0_1.<.ctor>b__0() at Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.Execute(Action action) Table 'ApiResources' already exists

Could you please help to see what did I missed? Thanks

Extended user authorization per Application

Actually Admin UI has only one level of authorization:

 services.AddAuthorization(options =>
            {
                options.AddPolicy(AuthorizationConsts.AdministrationPolicy,
                    policy => policy.RequireRole(AuthorizationConsts.AdministrationRole));
            });

There is need to provide access to Admin UI for users on Client Applicatiion level.
UserA has access to administrate App1, App2
UserB has access to administrate App1, App4, App5

Authorization must restrict user access in views to see only related to his application Client configurations, Stored Grants, Logs, Audit info etc.
What to do with application specific users is an open question.

I would suggest dynamic filters approach on DAL level
http://entityframework.net/ef-dynamic-filters
f.e Conditionally Enabling Filter could looks like that:
modelBuilder.Filter("HasClientId", (IHasClientId) => UserHasClientAppAdminClaim(d.ClientId));

  • where UserHasClientAppAdminClaim will check if exists from UserClaimsPrincipal 'application-admin' claim with ClientId.
    For the Clients list view filter will be applied multiple WHERE IN (c1, c2, c3) filter.

Second level Authorization feature must be toggable with feature flag from AppSettings.json.

Problem when using mssql server 2008

Good day,

had a problem using Admin pages, none of them opened, had to add .UseRowNumberForPaging()

services.AddDbContext<AdminDbContext>(options => options.UseSqlServer(configuration.GetConnectionString(ConfigurationConsts.AdminConnectionStringKey),
                optionsSql => optionsSql.MigrationsAssembly(migrationsAssembly).UseRowNumberForPaging()));

It is a known problem of EF core.

Best regards and thanks fore the project!

Run Admin in Staging

Hi!
I've tried to run app Admin in staging, but i always see that app try to redirect to /Account/Login. I think problem in this method:

        public static void AddAuthentication(this IServiceCollection services, IHostingEnvironment hostingEnvironment)
        {
            services.AddIdentity<UserIdentity, UserIdentityRole>()
                .AddEntityFrameworkStores<AdminDbContext>()
                .AddDefaultTokenProviders();

            //For integration tests use only cookie middleware
            if (hostingEnvironment.IsStaging())
            {
                services.AddAuthentication(options =>
                {
                    options.DefaultScheme = CookieAuthenticationDefaults.AuthenticationScheme;
                    options.DefaultChallengeScheme = CookieAuthenticationDefaults.AuthenticationScheme;

                    options.DefaultAuthenticateScheme = CookieAuthenticationDefaults.AuthenticationScheme;
                    options.DefaultForbidScheme = CookieAuthenticationDefaults.AuthenticationScheme;
                    options.DefaultSignInScheme = CookieAuthenticationDefaults.AuthenticationScheme;
                    options.DefaultSignOutScheme = CookieAuthenticationDefaults.AuthenticationScheme;
                })
                    .AddCookie(CookieAuthenticationDefaults.AuthenticationScheme,
                        options => { options.Cookie.Name = AuthorizationConsts.IdentityAdminCookieName; });
            }
            else
            {
                services.AddAuthentication(options =>
                {
                    options.DefaultScheme = CookieAuthenticationDefaults.AuthenticationScheme;
                    options.DefaultChallengeScheme = AuthorizationConsts.OidcAuthenticationScheme;

                    options.DefaultAuthenticateScheme = CookieAuthenticationDefaults.AuthenticationScheme;
                    options.DefaultForbidScheme = CookieAuthenticationDefaults.AuthenticationScheme;
                    options.DefaultSignInScheme = CookieAuthenticationDefaults.AuthenticationScheme;
                    options.DefaultSignOutScheme = CookieAuthenticationDefaults.AuthenticationScheme;
                })
                    .AddCookie(CookieAuthenticationDefaults.AuthenticationScheme,
                        options => { options.Cookie.Name = AuthorizationConsts.IdentityAdminCookieName; })
                    .AddOpenIdConnect(AuthorizationConsts.OidcAuthenticationScheme, options =>
                    {
                        options.Authority = AuthorizationConsts.IdentityServerBaseUrl;
                        options.RequireHttpsMetadata = false;

                        options.ClientId = AuthorizationConsts.OidcClientId;

                        options.Scope.Clear();
                        options.Scope.Add(AuthorizationConsts.ScopeOpenId);
                        options.Scope.Add(AuthorizationConsts.ScopeProfile);
                        options.Scope.Add(AuthorizationConsts.ScopeEmail);
                        options.Scope.Add(AuthorizationConsts.ScopeRoles);

                        options.SaveTokens = true;

                        options.TokenValidationParameters = new TokenValidationParameters
                        {
                            NameClaimType = JwtClaimTypes.Name,
                            RoleClaimType = JwtClaimTypes.Role,
                        };

                        options.Events = new OpenIdConnectEvents
                        {
                            OnMessageReceived = OnMessageReceived,
                            OnRedirectToIdentityProvider = OnRedirectToIdentityProvider
                        };
                    });
            }

App Admin does't contain definition for OpenIdConnect for Staging and I think it use default authentication methods. But app Admin doesn't contain Login page.

Add new project with API management

Add new project - Skoruba.IdentityServer4.Admin.Api:

  • Create a list of API controllers - for managing of the IdentityServer4 and Asp.Net Core Identity
  • Add swagger support

InvalidOperationException accessing Persisted Grants page

Hi,

I am receiving the following error while accessing the Persisted Grants page (/Grant/PersistedGrants):

An unhandled exception occurred while processing the request.
InvalidOperationException: The binary operator Equal is not defined for the types 'System.Nullable`1[System.Int32]' and 'System.Object'.

System.Linq.Expressions.Expression.GetEqualityComparisonOperator(ExpressionType binaryType, string opName, Expression left, Expression right, bool liftToNull)

This is the useful stack trace information:

image

I have changed only 2 things:

  • The project configuration to run it without IIS Express
  • The database related code to run using SQLite following the related instructions

The application seem to be working. Clicking everywhere I found this problem. I also tried adding the page and search arguments, but the error still persists.

Thanks!
Renato A. Ferreira

Consider moving Asp.Net Identity into the separate projects

I'd like to create the project template via dotnet new that doesn't include the part with AspNet Identity therefore I'd like to move Asp.Net Identity into the separate projects.

BusinessLogic:

  • Skoruba.IdentityServer4.Admin.BusinessLogic
  • Skoruba.IdentityServer4.Admin.BusinessLogic.AspNetIdentity

EntityFramework:

  • Skoruba.IdentityServer4.Admin.EntityFramework
  • Skoruba.IdentityServer4.Admin.EntityFramework.AspNetIdentity

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.