Coder Social home page Coder Social logo

Comments (6)

leastprivilege avatar leastprivilege commented on August 16, 2024

Am I just supposed to put the certificate in the ClientAssertion.Value and IdentityModle.OidcClient will use it

No - you need to create the complete assertion and set it for OidcClient to use it.

from identitymodel.oidcclient.

eholyat avatar eholyat commented on August 16, 2024

I created a good assertion and when I call oidcclient.LoginAsync() it is not sending the assertion. Do I need to use the lower level IdentityModel Client to accomplish private key jwts with certs?

from identitymodel.oidcclient.

leastprivilege avatar leastprivilege commented on August 16, 2024

IIRC no. Have you debugged it?

from identitymodel.oidcclient.

eholyat avatar eholyat commented on August 16, 2024

So, what I found is that IdentityModel only adds the ClientAssertion in the token request for Private Key Jwt(IdentityModel.Client.ProtocolRequest.cs Prepare()). I expected it to also be in the authorize request, and it is not added through callling LoginAsync().
Is there another way to do this without having to change AuthorizeClient.cs? Maybe using IdentityModel.Client.HttpClientTokenRequestExtensions???

The following would have to be added to IdentityModel.OidcClient.AuthorizeClient.cs
CreateAuthorizeParameters()

...
if (_options.RedirectUri.IsPresent())
{
parameters.Add(OidcConstants.AuthorizeRequest.RedirectUri, _options.RedirectUri);
}
/Would need this code to add assertion if exists
if (_options.ClientAssertion?.Value != null)
{
parameters.Add(OidcConstants.TokenRequest.ClientAssertion, _options.ClientAssertion.Value);
parameters.Add(OidcConstants.TokenRequest.ClientAssertionType, _options.ClientAssertion.Type);
}
/

from identitymodel.oidcclient.

leastprivilege avatar leastprivilege commented on August 16, 2024

The client assertion is used on when redeeming the code. This is correct.

from identitymodel.oidcclient.

brockallen avatar brockallen commented on August 16, 2024

All set on this issue -- can we close?

from identitymodel.oidcclient.

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.