S
S
Steve2021-03-25 11:18:34
symfony
Steve, 2021-03-25 11:18:34

Authorization with different keys?

I have an api with multiple endpoints that I have separated into areas, such as /api/doc/ and /api/doc/import/contact/. (I am using NelmioApiDocBundle). How to make authorization for different areas for different api keys (tokens)? How to implement? Is it even possible?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
Flying, 2021-03-25
@CenterJoin

Security firewalls have the ability to specify a query pattern for their application.
Thus, it is enough for you to define a set of firewalls for different url patterns and for each of them set up different user authorization conditions.
Details are in the documentation .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question