IdentityServer / IdentityServer4.AccessTokenValidation

IdentityServer Access Token Validation for ASP.NET Core
Apache License 2.0
544 stars 214 forks source link

Using this in a ASP.NET Core 2.0 project results in this #75

Closed SuperJMN closed 7 years ago

SuperJMN commented 7 years ago

image

error CS7069: Reference to type 'AuthenticationOptions' claims it is defined in 'Microsoft.AspNetCore.Authentication', but it could not be found

Is it caused because this library is incompatible with ASP.NET Core 2.0?

Please, tell us if it's going to be fixed soon. Thanks!

leastprivilege commented 7 years ago

We are working on it.

SuperJMN commented 7 years ago

Do you have an estimated release plan? We need to connect to our corporate Active Directory Federation Services from ASP.NET and we don't know any alternative to your library :(

Please, share as much information as you can.

Thank you!

leastprivilege commented 7 years ago

I just pushed 2.0.0-rc1 to nuget. Give it a try.

leastprivilege commented 7 years ago

Tracking this in #72.

yaronzo commented 7 years ago

I am a bit confused. Why is the issue closed?

I tried 2.0.0-rc1 and I am still facing the same problem (“Reference to type 'AuthenticationOptions' claims it is defined in 'Microsoft.AspNetCore.Authentication', but it could not be found”).

Any solutions?

I am just using the following code in the client side app.UseIdentityServerAuthentication( new IdentityServerAuthenticationOptions { Authority = "http://localhost:5000", RequireHttpsMetadata = false, ValidateScope = true, ApiName = apiName, //AutomaticAuthenticate = true, //AutomaticChallenge = true, AllowedScopes = { apiName }, EnableCaching=false // TODO: =true , ApiSecret= "blabla"//.Sha256() });

yaronzo commented 7 years ago

Does it means that we have to use other libraries for the client (API) which do not support introspection till the issue get solved?

leastprivilege commented 7 years ago

We pushed a rc1 to nuget.

TheFrogPrince commented 7 years ago

With 2.0.0-rc1, I get 'IApplicationBuilder' does not contain a definition for 'UseIdentityServerAuthentication' and no extension method 'UseIdentityServerAuthentication' accepting a first argument of type 'IApplicationBuilder' could be found

a bit maddening. Can't see the extension method anywhere in the Object Browser either. If I roll back to 1.2.1, then I can see the method in the Object Browser, but then I get the Reference to type 'AuthenticationOptions' claims it is defined in 'Microsoft.AspNetCore.Authentication', but it could not be found

Having flashbacks to the 90s. :) Not trying to rush anyone, just curious, is the only way forward right now with ID4.Validation to drop my project back to Core 1?

cbioley commented 7 years ago

@TheFrogPrince UseIdentityServerAuthentication is gone:

https://github.com/IdentityServer/IdentityServer4.AccessTokenValidation/commit/5ba378c09a8073d339c19ce40152a8fee7091a8f#diff-c1ce3f801529aee1d2de28674043763dL13

TheFrogPrince commented 7 years ago

Ah... thank you.

https://github.com/IdentityServer/IdentityServer4.Samples/blob/dev/Clients/src/SampleApi/Startup.cs#L23-L31

It hurts less when I quit banging my head against the wall. :)

cbioley commented 7 years ago

@TheFrogPrince It's also refreshing to realize you're not the only one to bang it against your lowly wall ^^