forked from jeansfish/RFC6749.zh-cn
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
and update the table of contents.
- Loading branch information
Showing
22 changed files
with
196 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
A.1. “client_id”语法 | ||
========================= | ||
“client_id”元素在[2.3.1](../Section02/2.3.1.md)节定义: | ||
|
||
client-id = *VSCHAR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
A.10. “grant_type”语法 | ||
=========================== | ||
“grant_type”元素在[4.1.3](../Section04/4.1.3.md)、[4.3.2](../Section04/4.3.2.md)、[4.4.2](../Section04/4.4.2.md)、[4.5](../Section04/4.5.md)和[6](../Section06/6.md)中定义: | ||
|
||
grant-type = grant-name / URI-reference | ||
grant-name = 1*name-char | ||
name-char = "-" / "." / "_" / DIGIT / ALPHA |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
A.11. “code”语法 | ||
=============== | ||
“code”元素在[4.1.3](../Section04/4.1.3.md)节中定义: | ||
|
||
code = 1*VSCHAR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
A.12. “access_token”语法 | ||
======================= | ||
“access_token”元素在[4.2.2](../Section04/4.2.2.md)节和[5.1](../Section05/5.1.md)节中定义: | ||
|
||
access-token = 1*VSCHAR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
A.13. “token_type”语法 | ||
============== | ||
“token_type”元素在[4.2.2](../Section04/4.2.2.md)、[5.1](../Section05/5.1.md)和[8.1](../Section08/8.1.md)中定义: | ||
|
||
token-type = type-name / URI-reference | ||
type-name = 1*name-char | ||
name-char = "-" / "." / "_" / DIGIT / ALPHA |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
A.14. “expires_in”语法 | ||
=============== | ||
“expires_in”元素在[4.2.2](../Section04/4.2.2.md)节和[5.1](../Section05/5.1.md)节中定义的: | ||
|
||
expires-in = 1*DIGIT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
A.15. “username”语法 | ||
================= | ||
“username”元素在[4.3.2](../Section04/4.3.2.md)节中定义: | ||
|
||
username = *UNICODECHARNOCRLF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
A.16. “password”语法 | ||
================== | ||
“password”元素在[4.3.2](../Section04/4.3.2.md)节中定义: | ||
|
||
password = *UNICODECHARNOCRLF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
A.17. “refresh_token”语法 | ||
=============== | ||
“refresh_token”元素在[5.1](../Section05/5.1.md)节和第[6](../Section06/6.md)节中定义: | ||
|
||
refresh-token = 1*VSCHAR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
A.18. 端点参数语法 | ||
=================== | ||
新的端点参数的语法在[8.2](../Section08/8.2.md)节中定义: | ||
|
||
param-name = 1*name-char | ||
name-char = "-" / "." / "_" / DIGIT / ALPHA |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
A.2. “client_secret”语法 | ||
========================== | ||
“client_secret”元素在[2.3.1](../Section02/2.3.1.md)节定义: | ||
|
||
client-secret = *VSCHAR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
A.3. “response_type”语法 | ||
======================= | ||
“response_type”元素在[3.1.1](../Section03/3.1.1.md)节和[8.4](../Section08/8.4.md)节中定义: | ||
|
||
response-type = response-name *( SP response-name ) | ||
response-name = 1*response-char | ||
response-char = "_" / DIGIT / ALPHA |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
A.4. “scope”语法 | ||
================== | ||
“scope”元素在[3.3](../Section03/3.3.md)节中定义: | ||
|
||
scope = scope-token *( SP scope-token ) | ||
scope-token = 1*NQCHAR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
A.5. “state”语法 | ||
==================== | ||
“state”元素在[4.1.1](../Section04/4.1.1.md)、[4.1.2](../Section04/4.1.2.md)、[4.1.2.1](../Section04/4.1.2.1.md)、[4.2.1](../Section04/4.2.1.md)、[4.2.2](../Section04/4.2.2.md)和[4.2.2.1](../Section04/4.2.2.1.md)节中定义: | ||
|
||
state = 1*VSCHAR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
A.6. “redirect_uri”语法 | ||
============================ | ||
“redirect_uri”元素在[4.1.1](../Section04/4.1.1.md)、[4.1.3](../Section04/4.1.3.md)、[4.2.1](../Section04/4.2.1.md)定义: | ||
|
||
redirect-uri = URI-reference |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
A.7. “error”语法 | ||
=================== | ||
“error”元素在[4.1.2.1](../Section04/4.1.2.1.md)、[4.2.2.1](../Section04/4.2.2.1.md)、[5.2](../Section05/5.2.md)、[7.2](../Section07/7.2.md)和[8.5](../Section08/8.5.md)中定义: | ||
|
||
error = 1*NQSCHAR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
A.8. “error_description”语法 | ||
============================ | ||
“error_description”元素在[4.1.2.1](../Section04/4.1.2.1.md)、[4.2.2.1](../Section04/4.2.2.1.md)、[5.2](../Section05/5.2.md)和[7.2](../Section07/7.2.md)中定义: | ||
|
||
error-description = 1*NQSCHAR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
A.9. “error_uri”语法 | ||
==================== | ||
“error_uri”元素在[4.1.2.1](../Section04/4.1.2.1.md)、[4.2.2.1](../Section04/4.2.2.1.md)、[5.2](../Section05/5.2.md)和[7.2](../Section07/7.2.md)中定义: | ||
|
||
error-uri = URI-reference |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
附录A. 增强巴科斯-诺尔范式(ABNF)语法 | ||
============================== | ||
本节提供了本文档中定义的元素按[RFC5234][RFC5234]记法的增强巴克斯诺尔范式(ABNF)的语法描述。下列ABNF用Unicode代码要点[W3C.REC-XML-20081126]的术语定义;这些字符通常以UTF-8编码。元素按首次定义的顺序排列。 | ||
|
||
一些定义遵循使用来自[RFC3986][RFC3986]“URI引用”的定义。 | ||
|
||
一些定义遵循使用这些通用的定义: | ||
|
||
VSCHAR = %x20-7E | ||
NQCHAR = %x21 / %x23-5B / %x5D-7E | ||
NQSCHAR = %x20-21 / %x23-5B / %x5D-7E | ||
UNICODECHARNOCRLF = %x09 /%x20-7E / %x80-D7FF / %xE000-FFFD / %x10000-10FFFF | ||
(UNICODECHARNOCRLF定义基于[W3C.REC-XML-20081126]2.2节中定义的字符,但忽略了回车和换行字符。) | ||
|
||
- A.1. [“client_id”语法](a.1.md) | ||
- A.2. [“client_secret”语法](a.2.md) | ||
- A.3. [“response_type”语法](a.3.md) | ||
- A.4. [“scope”语法](a.4.md) | ||
- A.5. [“state”语法](a.5.md) | ||
- A.6. [“redirect_uri”语法](a.6.md) | ||
- A.7. [“error”语法](a.7.md) | ||
- A.8. [“error_description”语法](a.8.md) | ||
- A.9. [“error_uri”语法](a.9.md) | ||
- A.10. [“grant_type”语法](a.10.md) | ||
- A.11. [“code”语法](a.11.md) | ||
- A.12. [“access_token”语法](a.12.md) | ||
- A.13. [“token_type”语法](a.13.md) | ||
- A.14. [“expires_in”语法](a.14.md) | ||
- A.15. [“username”语法](a.15.md) | ||
- A.16. [“password”语法](a.16.md) | ||
- A.17. [“refresh_token”语法](a.17.md) | ||
- A.18. [端点参数语法](a.18.md) | ||
|
||
[RFC5234]:http://tools.ietf.org/html/rfc5234 "Augmented BNF for Syntax Specifications: ABNF" | ||
[RFC3986]:http://tools.ietf.org/html/rfc3986 "Uniform Resource Identifier (URI): Generic Syntax" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
附录B. 使用application/x-www-form-urlencoded媒体类型 | ||
================================== | ||
在本规范公布的时候,“application/x-www-form-urlencoded”媒体类型在[W3C.REC-html401-19991224]的17.13.4节中定义但未在IANA MIME媒体类型注册表(<[http://www.iana.org/assignments/media-types](http://www.iana.org/assignments/media-types)>)中注册。此外,该定义是不完整的,因为它未考虑非US-ASCII的字符。 | ||
在使用这种媒体类型生成有效载荷使时为解决这个缺点,名称和值必须首先使用UTF-8字符编码方案[RFC3629]编码;作为结果的八位序列然后需要使用在[W3C.REC-html401-19991224]中定义的转义规则进一步编码。 | ||
当从使用这种媒体类型的有效载荷中解析数据时,由逆向名称/值编码得到的名称和值因而需要被视作八位序列,使用UTF-8字符编码方案解码。 | ||
例如,包含六个Unicode代码点的值 | ||
|
||
(1) U+0020 (SPACE), (2) U+0025 (PERCENT SIGN), | ||
(3) U+0026 (AMPERSAND), (4) U+002B (PLUS SIGN), | ||
(5) U+00A3 (POUND SIGN), (6) U+20AC (EURO SIGN) | ||
将被编码成如下的八位序列(使用十六进制表示): | ||
|
||
20 25 26 2B C2 A3 E2 82 AC | ||
然后在有效载荷中表示为: | ||
|
||
+%25%26%2B%C2%A3%E2%82%AC | ||
|
||
[RFC3629]:http://tools.ietf.org/html/rfc3629 "UTF-8" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
附录C. 致谢 | ||
=================== | ||
最初的OAuth 2.0协议规范是由David Recordon编辑的,基于先前的两个发行版:OAuth 1.0社区规范[RFC5849][RFC5849]和OAuth WRAP(OAuth Web资源授权配置)[OAuth WRAP]。Eram Hammer然后编辑了包含在此RFC中的中间草稿。Torsten Lodderstedt, Mark McGloin, Phil Hunt, Anthony Nadalin和John Bradley起草了“安全注意事项”一节。使用“application/x-www-form.urlencoded”媒体类型一节由Julian Reschke起草。ABNF一节由Julian Reschke起草。 | ||
|
||
OAuth 1.0社区规范由Eran Hammer编辑并由Mark Atwood, Dirk Balfanz, Darren Bounds, Richard M. Conlan, Blaine Cook, Leah Culver, Breno de Medeiros, Brian Eaton,Kellan Elliott-McCrea, Larry Halff, Eran Hammer, Ben Laurie, Chris Messina, John Panzer, Sam Quigley, David Recordon, Eran Sandler, Jonathan Sergent, Todd Sieling, Brian Slesinsky以及Andy Smith撰写。 | ||
|
||
OAuth WRAP规范由 Dick Hardt编辑,由Brian Eaton, Yaron Y. Goland, Dick Hardt, and Allen Tom撰写。 | ||
本规范是OAuth工作组的工作,其中包括几十个积极的和专门的参与者。特别是,下列个人贡献了想法,反馈和措辞,格式化了最终的规范: | ||
|
||
Michael Adams, Amanda Anganes, Andrew Arnott, Dirk Balfanz, Aiden Bell, John Bradley, Marcos Caceres, Brian Campbell, Scott Cantor, Blaine Cook, Roger Crew, Leah Culver, Bill de hOra, Andre DeMarre, Brian Eaton, Wesley Eddy, Wolter Eldering, Brian Ellin, Igor Faynberg, George Fletcher, Tim Freeman, Luca Frosini, Evan Gilbert, Yaron Y. Goland, Brent Goldman, Kristoffer Gronowski, Eran Hammer, Dick Hardt, Justin Hart, Craig Heath, Phil Hunt, Michael B. Jones, Terry Jones, John Kemp, Mark Kent, Raffi Krikorian, Chasen Le Hara, Rasmus Lerdorf, Torsten Lodderstedt, Hui-Lan Lu, Casey Lucas, Paul Madsen, Alastair Mair, Eve Maler, James Manger, Mark McGloin, Laurence Miao, William Mills, Chuck Mortimore, Anthony Nadalin, Julian Reschke, Justin Richer, Peter Saint-Andre, Nat Sakimura, Rob Sayre, Marius Scurtescu, Naitik Shah, Luke Shepard, Vlad Skvortsov, Justin Smith, Haibin Song, Niv Steingarten, Christian Stuebner, Jeremy Suriel, Paul Tarjan, Christopher Thomas, Henry S. Thompson, Allen Tom, Franklin Tse, Nick Walker, Shane Weeden和Skylar Woodward. | ||
|
||
本文档由主席团Blaine Cook, Peter Saint-Andre, Hannes Tschofenig, Barry Leiba和Derek Atkins出品。 | ||
|
||
区域指导包括 Lisa Dusseault, Peter Saint-Andre和Stephen Farrell. | ||
|
||
作者署名 | ||
|
||
Dick Hardt (editor) | ||
Microsoft | ||
|
||
EMail: [email protected] | ||
URI: http://dickhardt.org/ | ||
|
||
[RFC5849]:http://tools.ietf.org/html/rfc5849 "The OAuth 1.0 Protocol" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters