Git Product home page Git Product logo

Comments (16)

leastprivilege avatar leastprivilege commented on May 31, 2024

thanks!

Is the protocol enabled in config?

from identityserver2.

vip32 avatar vip32 commented on May 31, 2024

the idp webconfigs are al standard. can't find anything oauth2 related there. can you specify what i have to enable?

from identityserver2.

leastprivilege avatar leastprivilege commented on May 31, 2024

In the admin UI - there is a protocols section where you can enable/disable protocols

from identityserver2.

vip32 avatar vip32 commented on May 31, 2024

in the idp ui oauth2 is enabled (default)

from identityserver2.

leastprivilege avatar leastprivilege commented on May 31, 2024

You might get a 404 when you call the endpoint with the wrong parameters. See the Tests project in the solution for samples how to call the endpoint.

from identityserver2.

vip32 avatar vip32 commented on May 31, 2024

the 'token' part seems missing, helps a bit. now its a 400 (bad request). Im not sure if i have to specify 'token', shouldn't that be handled by OAuth2Client?

static Uri _oauth2Address = new Uri("https://localhost/idsrv/issue/oauth2/token");
....
private static string GetIdentityToken()
{
"Requesting token".ConsoleYellow();
var client = new OAuth2Client(_oauth2Address);
var response = client.RequestAccessTokenUserName("admin", "***", "https://IdSrv_OAuth2Client"); // 400 error
return response.AccessToken;
}

from identityserver2.

vip32 avatar vip32 commented on May 31, 2024

i'll have a look at the integration tests and try to run them against my idp...

from identityserver2.

leastprivilege avatar leastprivilege commented on May 31, 2024

Ah you are using the newest build. This requires client authentication by default (the ctor on OAuth2Client that takes a clientId and secret) - otherwise you will get a 400 (plus an error message in the response). You can also turn off client auth for now in the admin UI.

Right now there is no GUI for configuring clients - but you can have a look at the Clients table in the config DB.

from identityserver2.

vip32 avatar vip32 commented on May 31, 2024

Yes im on the master. the integration test ValidUserNameCredentialValidClientCredential() fails too with a 400. Even after disabling client auth in the admin ui.

from identityserver2.

vip32 avatar vip32 commented on May 31, 2024

the integration test is using the clientid and secret ctor, but also fail. where can i add these to the db? OAuth2Configuration table does not have these columns

from identityserver2.

vip32 avatar vip32 commented on May 31, 2024

must say that my testapp uses the nuget identitymodel package (2.1.9). which may be out of date with the identityserver (2.1.8).

but the integration tests use 2.1.8 and fail in the same way....

from identityserver2.

leastprivilege avatar leastprivilege commented on May 31, 2024

Have a look at the constants in the test project. You need to create the corresponding users in your db.

from identityserver2.

vip32 avatar vip32 commented on May 31, 2024

Great the integration tests works now. I did the following :

  • added user dominick/abc!123
  • upgraded to current master (identityserver) with identitymodel 2.2.0
  • didn't make any changes to the db

vielen dank :)

from identityserver2.

leastprivilege avatar leastprivilege commented on May 31, 2024

super!

from identityserver2.

vip32 avatar vip32 commented on May 31, 2024

and indeed, an invalid user gives a 400

from identityserver2.

leastprivilege avatar leastprivilege commented on May 31, 2024

Which is in accordance with the OAuth2 spec ;)

from identityserver2.

Related Issues (20)

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.