Giter Site home page Giter Site logo

Comments (6)

kevinchalet avatar kevinchalet commented on July 18, 2024

how can handle Authorize Attribute for ASOS?

ASOS doesn't validate tokens, it only issues them. Instead, you'll want to use the OAuth validation handler and register it using services.AddAuthentication().AddOAuthValidation(). Its default authentication scheme is "Bearer", for which you can find a constant in OAuthValidationDefaults.

Cheers.

from aspnet.security.openidconnect.server.

p30help avatar p30help commented on July 18, 2024

Thanks a lot
I added services.AddAuthentication().AddOAuthValidation() but AddOAuthValidation() not found.
I use "OpenIdConnectServer" package.
do i need to add "OpenIddict 2.x" package too?

from aspnet.security.openidconnect.server.

kevinchalet avatar kevinchalet commented on July 18, 2024

No, you just need the AspNet.Security.OAuth.Validation package (which is also what the OpenIddict validation module uses under the hood).

from aspnet.security.openidconnect.server.

p30help avatar p30help commented on July 18, 2024

Thanks a lot again
I could validate access_token now,
Another small problem:
Custom claims not generated on access_token, for example i added some claims to "identity" object and then call Validate(); method
claim result is like under:

{sub: [unique id]}
{username: admin}
{scope: offline_access}

but when validate access_token and get claims from context.Principal.Claims some of custom claim is not existed, like this:

{sub: [unique id]}
{scope: offline_access}

why my custom claims not generated on access_token at first?

from aspnet.security.openidconnect.server.

kevinchalet avatar kevinchalet commented on July 18, 2024

why my custom claims not generated on access_token at first?

https://kevinchalet.com/2016/07/13/creating-your-own-openid-connect-server-with-asos-adding-custom-claims-and-granting-scopes/

from aspnet.security.openidconnect.server.

p30help avatar p30help commented on July 18, 2024

God bless you 👍

from aspnet.security.openidconnect.server.

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.