Support ASP.NET Core 2.0
why don't you run build.ps1 yourself - the result will be a nuget package...
First nuget with aspnet core 2 preview2 support:
https://www.nuget.org/packages/IdentityServer4/2.0.0-preview2
Give it a try and let us know what's not working...
Awesome! Will the other packages like identityServer4 with ASP Net identity or JWT Authentication work fine or do they need to be updated as well?
On Wed, Jul 19, 2017 at 7:54 AM, Dominick Baier [email protected] wrote:
First nuget with aspnet core 2 preview2 support:
https://www.nuget.org/packages/IdentityServer4/2.0.0-preview2
Give it a try and let us know what's not working...
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/IdentityServer/IdentityServer4/issues/1055#issuecomment-316290372, or mute the thread https://github.com/notifications/unsubscribe-auth/AFqqs65RRaXWJlVqh-5eiRNA62NcYFRmks5sPag5gaJpZM4M7gaj .
they also need updating.
Hi , Thanks for the great work . i'm trying to implement IDS4 in Core 2.0 ,i also update IDS4 using below nuget comment " Install-Package IdentityServer4 -Pre" , i'm getting following error
app.UseIdentityServerAuthentication(new IdentityServerAuthenticationOptions { //Identity Server URL Authority = "http://localhost:49370", RequireHttpsMetadata = false, ApiName = "api1" });
Severity Code Description Project File Line Suppression State Error CS7069 Reference to type 'AuthenticationOptions' claims it is defined in 'Microsoft.AspNetCore.Authentication', but it could not be found
The access token validation middleware hasn't been ported. Use Microsoft's JwtBearer as a replacement for now.
@leastprivilege am i correct ? ** app.UseJwtBearerAuthentication(new JwtBearerOptions { Authority= "http://localhost:49370", RequireHttpsMetadata=false });**
is this correct way?
And Audience
I'm getting following everity Code Description Project File Line Suppression State Error CS0619 'JwtBearerAppBuilderExtensions.UseJwtBearerAuthentication(IApplicationBuilder, JwtBearerOptions)' is obsolete: 'See https://go.microsoft.com/fwlink/?linkid=845470'
can you provide any suggestion
Well - there are breaking changes in aspnetcore2 - this is not really the place to discuss them - but have a look here
https://github.com/aspnet/Announcements/issues/262
services.AddJwtBearerAuthentication(o => { o.Authority = "http://localhost:49371/"; o.Audience = "myapi"; });
IDS4 running in this URL "http://localhost:49371" ,but i's not authorize
its showing 500 error , am i wrong in my configuration?
Maybe try setting the DefaultAuthenticate Scheme to JwtBearer Scheme? This works for me.
services.AddAuthentication(options =>
{
options.DefaultAuthenticateScheme = JwtBearerDefaults.AuthenticationScheme;
options.DefaultChallengeScheme = JwtBearerDefaults.AuthenticationScheme;
});
Or disable https
services.AddJwtBearerAuthentication(o =>
{
o.Audience = "myapi";
o.Authority = "http://localhost:5000";
o.RequireHttpsMetadata = false;
});
Still same issue :( 401 unauthorized ,
services.AddJwtBearerAuthentication(o => {
o.Authority = "http://localhost:49371/";
o.Audience = "http://localhost:49371/resources";
o.RequireHttpsMetadata = false;
});
Did you put app.UseAuthentication(); before app.UseMvc(); in the Configure method?
Yes @KalBence
in configure method app.UseAuthentication();
in ConfigureServices method
services.AddJwtBearerAuthentication(o => { o.Authority = "http://localhost:49371/";
o.Audience = "http://localhost:49371/resources";
o.RequireHttpsMetadata = false;
});

this is my request
Remove the last '/' from o.Authority = "http://localhost:49371/"; to, o.Authority = "http://localhost:49371";
I hope this helps someone trying to use Identity Server with net Core 2 following the IDS4 Tutorial.
There is not full support for all the identity server 4 packages for Net Core 2 Yet, the workaround it's build up your Identity Server with net core 1.1, and you can validate tokens from resources build in net core 2.0 using Microsoft JwtBearer like this:
After creating the api add this to ConfigureServices
services.AddAuthentication(options =>
{
options.DefaultAuthenticateScheme = JwtBearerDefaults.AuthenticationScheme;
options.DefaultChallengeScheme = JwtBearerDefaults.AuthenticationScheme;
}).AddJwtBearer(o =>
{
o.Authority = "http://localhost:5000";
o.Audience = "api1";
o.RequireHttpsMetadata = false;
});
and change this code in Configure Method (As written in the tutorial):
app.UseIdentityServerAuthentication(new IdentityServerAuthenticationOptions
{
Authority = "http://localhost:5000",
RequireHttpsMetadata = false,
ApiName = "api1"
});
for this (Remember just before app.UseMvc() ):
app.UseAuthentication();
This is a workaround while the rest of the identity server nuget's get updated to net core 2.0 !
In the meantime I'll keep testing the project.
Good work guys ! and Awesome project ! Keep it up please !
Dear,
I'm following the official documentation on how to implement my first ID4 server on ASPNET CORE 2.0, but when i try to debug the application i encounter the exception:
System.MissingMethodException:'Method not found: 'Microsoft.Extensions.DependencyInjection.IServiceCollection Microsoft.Extensions.DependencyInjection.AuthenticationServiceCollectionExtensions.AddAuthentication(Microsoft.Extensions.DependencyInjection.IServiceCollection)'.'
My ConfigureServices() is this:
var migrationsAssembly = typeof(Startup).GetType().Assembly.GetName().Name;
services.AddMvc();
services.AddIdentityServer()
.AddTemporarySigningCredential()
.AddTestUsers(Config.GetUsers())
.AddConfigurationStore(builder =>
builder.UseSqlServer(Configuration.GetConnectionString("credential"), options =>
options.MigrationsAssembly(migrationsAssembly)))
.AddOperationalStore(builder =>
builder.UseSqlServer(Configuration.GetConnectionString("credential"), options =>
options.MigrationsAssembly(migrationsAssembly)));
My NuGets are:
- IdentityServer4.AspNetIdentity 1.0.1
- IdentityServer4.EntityFramework 1.0.1
- All MS packages are 2.0.0
I tried also using IdentitServer4 => v2.0.0-preview2 but the error remain.
Do you have some suggestion?