Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help Please #7

Open
MarkLFT opened this issue Oct 27, 2024 · 0 comments
Open

Help Please #7

MarkLFT opened this issue Oct 27, 2024 · 0 comments

Comments

@MarkLFT
Copy link

MarkLFT commented Oct 27, 2024

I am playing with this to better understand using Yarp with Keycloak. I have got most of it working, but I have two issues, and to be honest, they may be related.

In the appsettings, near the top is the APIs section. Can someone please explain the purpose of these and where I should get the values?

Secondly, I don't have an API as such behind YARP; I have a Blazor Server App. Later I will be adding more APIs and more Blazor apps, but for now there is a single Blazor app. I want user validation done in Yarp, which I how figured out, and we have an access token. But this token does not seem to be passed to the Blazor App. In my Blazor app if have the following, which I thought would pick up the JWT and use it.

builder.Services.AddAuthentication("Bearer")
    .AddJwtBearer("Bearer", options =>
{
    options.Authority = "http://192.168.100.84:8080/";
    options.RequireHttpsMetadata = false;
    options.TokenValidationParameters = new TokenValidationParameters
    {
        ValidateAudience = false // depending on your setup
    };
});

Please can someone help with what I am missing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant