Basic access authentication: Difference between revisions

Content deleted Content added
External links: switch to bespoke citation template
Tags: Mobile edit Mobile web edit Advanced mobile edit
Server side: and again
Tags: Mobile edit Mobile web edit Advanced mobile edit
Line 26:
 
=== Server side ===
When the server wants the user agent to authenticate itself towards the server after receiving an unauthenticated request, it must send a response with a ''HTTP 401 Unauthorized'' status line<ref>{{cite webIETF|titlerfc=RFC 1945 Section|section =11. |title=Access Authentication|url=https://tools.ietf.org/html/rfc1945#section-11|publisher=IETF|access-date=3 February 2017|page=46|date=May 1996}}</ref> and a ''WWW-Authenticate'' header field.<ref>{{cite webIETF|urlrfc=http://tools.ietf.org/html/rfc1945#1945|section-=10.16|title=Hypertext Transfer Protocol -- HTTP/1.0|last1=Fielding|first1=Roy T.|last2=Berners-Lee|first2=Tim|first3=Frystyk|last3=Henrik|website=tools.ietf.org|author-link1=Roy Fielding|author-link2=Tim Berners-Lee}}</ref>
 
The ''WWW-Authenticate'' header field for basic authentication is constructed as following: