-3

I have a situation, when I should to send a POST request to authenticate user, if it's succeed then server set a cookie and then we can get a protected page:

  1. First request by Postman:

enter image description here

  1. Second request (after first):

enter image description here

I need to implement it on web page. As I understand now, it's possible only via frames. How to do it? First request should be sent automatically after opening a page, so, user should open the page and see a protected page.

Oleg Sh
  • 8,496
  • 17
  • 89
  • 159
  • What is your question and what is the problem? – MathieuAuclair Feb 11 '19 at 17:22
  • I need to ask some questions: 1.In case of first when u send POST request .How will u be taking user credentials to authenticate? 2. If he got authenticated successfully then only protected page should be visible ,Till this process will loading bar display in web page? – this_is_om_vm Feb 12 '19 at 06:19
  • I'm not sure of understanding well your question. Why can't you just get the cookie and redirect the user to the protected page? – Javier Paz Sedano Feb 12 '19 at 12:02
  • I think ajax will solve your problem. See this https://stackoverflow.com/questions/2870371/why-is-jquerys-ajax-method-not-sending-my-session-cookie – I_Al-thamary Feb 12 '19 at 14:57

1 Answers1

-1

Cookie Authentication is you are trying to achieve?, here is are some links which will help to you with that. https://dzone.com/articles/cookie-authentication-with-aspnet-core-20

jackson
  • 16
  • 3