Answer the question
In order to leave comments, you need to log in
What is the best way to secure a request?
I have one view.
In the same controller there are for example 3 methods.
For example, add, remove, update the number of apples.
What is better to use?
ajax form?
with @Html.AntiForgeryToken()
or a simple request on click controller/action/???
it turns out on one view, I need to file three ajax forms with AntiForgeryToken ()
UPD:
I read the post https://habrahabr.ru/sandbox/86785/ before writing this question... I need to find out, let's say, that the
request
will be more correct
controller / action with the help of this post, so to speak, or sawing an entire form for each request ???
Answer the question
In order to leave comments, you need to log in
https://habrahabr.ru/sandbox/86785/ maybe this will help, in principle it suits your task. If you work with ajax, then there is an option to make a WebAPI with a Bearer token.
here is an example of how to work with tokens
https://github.com/rfaisal/ASPWebAPI_Example_OAuth...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question