3.1.1. 响应类型(3.1.1. Response Type)

3.1.1. 响应类型

授权端点被授权码许可类型和隐式许可类型流程使用。客户端使用下列参数通知授权服务器期望的许可类型:

  • response_type
    必需的。其值必须是如4.1.1节所述用于请求授权码的“code”,如4.2.1节所述用于请求访问令牌的“token”(隐式许可)或者如8.4节所述的一个注册的扩展值之中的一个。

扩展响应类型可以包含一个空格(%x20)分隔的值的列表,值的顺序并不重要(例如,响应类型“a b”与“b a”相同)。 这样的复合响应类型的含义由他们各自的规范定义。

如果授权请求缺少“response_type”参数,或者如果响应类型不被理解,授权服务器必须返回一个4.1.2.1所述的错误响应。

 

3.1.1. Response Type



   The authorization endpoint is used by the authorization code grant
   type and implicit grant type flows.  The client informs the
   authorization server of the desired grant type using the following
   parameter:

   response_type
         REQUIRED.  The value MUST be one of "code" for requesting an
         authorization code as described by Section 4.1.1, "token" for
         requesting an access token (implicit grant) as described by
         Section 4.2.1, or a registered extension value as described by
         Section 8.4.

   Extension response types MAY contain a space-delimited (%x20) list of
   values, where the order of values does not matter (e.g., response
   type "a b" is the same as "b a").  The meaning of such composite
   response types is defined by their respective specifications.

   If an authorization request is missing the "response_type" parameter,
   or if the response type is not understood, the authorization server
   MUST return an error response as described in Section 4.1.2.1.