8.1. 定义访问令牌类型(8.1. Defining Access Token Types)
8.1. 定义访问令牌类型
访问令牌类型可以用以下两种方法之一来定义:在访问令牌类型注册表中注册(按11.1节中的过程)的,或者通过使用一个唯一的绝对URI作为它的名字。
采用URI命名的类型应该限定于特定供应商的实现,它们不是普遍适用的并且特定于使用它们的资源服务器的实现细节。
所有其他类型都必须注册。类型名称必需符合type-name ANBF。如果类型定义包含了一种新的HTTP身份验证方案,该类型名称应该与该HTTP身份验证方案名称一致(如RFC2617定义)。令牌类型“example”被保留用于样例中。
type-name = 1*name-char name-char = "-" / "." / "_" / DIGIT / ALPHA
8.1. Defining Access Token Types
Access token types can be defined in one of two ways: registered in
the Access Token Types registry (following the procedures in
Section 11.1), or by using a unique absolute URI as its name.
Types utilizing a URI name SHOULD be limited to vendor-specific
implementations that are not commonly applicable, and are specific to
the implementation details of the resource server where they are
used.
All other types MUST be registered. Type names MUST conform to the
type-name ABNF. If the type definition includes a new HTTP
authentication scheme, the type name SHOULD be identical to the HTTP
authentication scheme name (as defined by [RFC2617]). The token type
"example" is reserved for use in examples.
type-name = 1*name-char
name-char = "-" / "." / "_" / DIGIT / ALPHA
No Comments