WildGums / Blorc.OpenIdConnect

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add audience or Resource

vitalybrandes opened this issue · comments

IF YOU DON'T ANSWER THIS TEMPLATE - THE BOT WILL AUTOMATICALLY CLOSE YOUR ISSUE!

I found some new identity provide kinde,
to get audience they asking to send the audience in request
https://kinde.com/docs/build/get-access-token-for-connecting-securely-to-kindes-api/#get-the-access-token-postman-example

Is it possible?

To the best of our knowledge of the protocol, the audience is requested using the Scope parameter from the configuration. We support request audience in this way from the configuration "Scope": "openid profile %API-NAME%". For details, take a look at the demo or the readme.md file. We don't have support for this configuration using audience value as a URL.

To the best of our knowledge of the protocol, the audience is requested using the Scope parameter from the configuration. We support request audience in this way from the configuration "Scope": "openid profile %API-NAME%". For details, take a look at the demo or the readme.md file. We don't have support for this configuration using audience value as a URL.

Can i some how to extent current to support audience?

I am using logto.io for user Auth.
logto.io request "audience" or "Resource" to get access_token.
https://docs.logto.io/docs/recipes/protect-your-api/spring-boot/#configure-application

There ia allot of issue regarding the same in Auth0.
Using there is some solution AdditionalProviderParameters in AddOidcAuthentication
builder.Services.AddOidcAuthentication(options =>
{
options.ProviderOptions.AdditionalProviderParameters.Add("resource", builder.Configuration["Auth0:Audience"]);
}

https://community.auth0.com/t/blazor-webassembly-apps-with-multiple-audience/70736

Logto leverages RFC 8707 for resources. So an extra resource parameter is required for the code flow.

@alexfdezsauco
Can you please check the gao-sun pill request?
Thanks

@alexfdezsauco I quickly reviewed, looking forward to hear what you think. As long as this doesn't break existing flow for Keycloak, I don't mind adding this when there are unit tests covering this scenario and the docs are updated.

Sorry for the delay, let me check.

@vitalybrandes @gao-sun Just released 1.9.0-beta1 to NuGet. Can you please double check it works for you? Then we can release as stable.

@vitalybrandes @gao-sun Just released 1.9.0-beta1 to NuGet. Can you please double check it works for you? Then we can release as stable.

Sure will check it soon.

@GeertvanHorrik I can confirm the new options work as expected. Now we can fetch a JWT access token from Logto:

image

I'll write a tutorial soon.