Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Issue running IdentityServer4

I am learning about the IdentityServer4 https://identityserver4.readthedocs.io/en/release/quickstarts/0_overview.html but seem to be having issues getting it working.

After creating the API section of the project and configured accordingly:

public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory)
        {
            loggerFactory.AddConsole(Configuration.GetSection("Logging"));
            loggerFactory.AddDebug();

            app.UseIdentityServerAuthentication(new IdentityServerAuthenticationOptions
            {
                Authority = "http://localhost:5000",
                RequireHttpsMetadata = false,

                ApiName = "api1"
            });

            app.UseMvc();
        }

I get the following error:

'IApplicationBuilder' does not contain a definition for 'UseIdentityServerAuthentication' and no extension method 'UseIdentityServerAuthentication' accepting a first argument of type 'IApplicationBuilder' could be found (are you missing a using directive or an assembly reference?)

Any advice what i am missing here?

EDIT 1: I've noticed i cannot reference the namespace either even tho the package is installed and present.

i.e.

using IdentityServer4.AccessTokenValidation;

or

using IdentityServer4;
like image 538
Aeseir Avatar asked Mar 16 '17 08:03

Aeseir


People also ask

What is the use of IdentityServer4?

IdentityServer is an authentication server that implements OpenID Connect (OIDC) and OAuth 2.0 standards for ASP.NET Core. It's designed to provide a common way to authenticate requests to all of your applications, whether they're web, native, mobile, or API endpoints.

Is IdentityServer paid?

The new Duende IdentityServer continues to be open source, but now has a dual license. This license allows it to be used for free for development, testing, and learning, free for non-commercial open source, and free for use in commercial settings if the entity or organization makes less than 1 million USD/year.

Is IdentityServer4 open source?

About IdentityServer4IdentityServer is a free, open source OpenID Connect and OAuth 2.0 framework for ASP.NET Core.


1 Answers

Well, I just closed and reopened Visual Studio 2017, and the problem went away. Perhaps Visual Studio choked on pulling down the IdentityServer4.AccessTokenValidation package the first time, and reopening the project caused it to try again and this time it succeeded.

like image 185
Jeremy Cook Avatar answered Sep 23 '22 08:09

Jeremy Cook