What is an Endpoint?

后端 未结 9 1628
不思量自难忘°
不思量自难忘° 2020-12-04 04:39

I have been reading about OAuth and it keeps talking about endpoints. What is exactly an endpoint?

9条回答
  •  暖寄归人
    2020-12-04 05:25

    Endpoint, in the OpenID authentication lingo, is the URL to which you send (POST) the authentication request.

    Excerpts from Google authentication API

    To get the Google OpenID endpoint, perform discovery by sending either a GET or HEAD HTTP request to https://www.google.com/accounts/o8/id. When using a GET, we recommend setting the Accept header to "application/xrds+xml". Google returns an XRDS document containing an OpenID provider endpoint URL.The endpoint address is annotated as:

    
    http://specs.openid.net/auth/2.0/server 
    {Google's login endpoint URI} 
    
    

    Once you've acquired the Google endpoint, you can send authentication requests to it, specifying the appropriate parameters (available at the linked page). You connect to the endpoint by sending a request to the URL or by making an HTTP POST request.

提交回复
热议问题