Kahbazi / MediatR.AspNetCore.Endpoints

MIT License
111 stars 12 forks source link

use authentication and authorization? #11

Closed diegoth-dev closed 3 years ago

diegoth-dev commented 3 years ago

Is it possible to use authentication and authorization?

Kahbazi commented 3 years ago

Yes, since this library add mediarR requests as an endpoint, all the features that could be apply to the endpoints could also apply here.

Here's a sample:

https://github.com/Kahbazi/MediatR.AspNetCore.Endpoints/blob/f48cbe2f3dc1a95ff45e8af50f95dbe72b2686a4/test/MediatR.AspNetCore.Endpoints.FunctionalTests/Requests/AuthorizedRequest.cs#L13-L22

https://github.com/Kahbazi/MediatR.AspNetCore.Endpoints/blob/f48cbe2f3dc1a95ff45e8af50f95dbe72b2686a4/test/MediatR.AspNetCore.Endpoints.FunctionalTests/AuthorizationTests.cs#L24-L45