Skip to content

Allow user flexibility in authentication/authorization middleware options #656

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

Closed
wisepotato opened this issue Dec 11, 2019 · 4 comments · Fixed by #665
Closed

Allow user flexibility in authentication/authorization middleware options #656

wisepotato opened this issue Dec 11, 2019 · 4 comments · Fixed by #665

Comments

@wisepotato
Copy link
Contributor

https://stackoverflow.com/questions/58089827/asp-net-core-authentication-broken-after-upgrade-to-3-0

We need to execute app.UseAuthentication() and app.UseAuthorization() in between UseRouting and UseEndpoints. Will investigate.

@maurei
Copy link
Member

maurei commented Dec 23, 2019

Can you elaborate a bit on this? What is the status on this?

@Lobosque
Copy link

@bjornharrtell would you please provide an example of how to pass custom Authentication and Authorization as per your Pull Request?

@bart-degreed
Copy link
Contributor

@Lobosque In your Startup.cs:

// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public virtual void Configure(IApplicationBuilder app, AppDbContext context)
{
    app.UseJsonApi(_ =>
    {
        app.UseAuthentication();
        app.UseAuthorization();
    });
}

@maurei
Copy link
Member

maurei commented Feb 12, 2020

@Lobosque we're doing some changes in the PR and the example provided in the PR won't be functional in the master branch (see related PR #665, expecting to merge tomorrow)

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

Successfully merging a pull request may close this issue.

4 participants