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;
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.
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.
About IdentityServer4IdentityServer is a free, open source OpenID Connect and OAuth 2.0 framework for ASP.NET Core.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With