rfc5849.txt 79 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131
  1. Internet Engineering Task Force (IETF) E. Hammer-Lahav, Ed.
  2. Request for Comments: 5849 April 2010
  3. Category: Informational
  4. ISSN: 2070-1721
  5. The OAuth 1.0 Protocol
  6. Abstract
  7. OAuth provides a method for clients to access server resources on
  8. behalf of a resource owner (such as a different client or an end-
  9. user). It also provides a process for end-users to authorize third-
  10. party access to their server resources without sharing their
  11. credentials (typically, a username and password pair), using user-
  12. agent redirections.
  13. Status of This Memo
  14. This document is not an Internet Standards Track specification; it is
  15. published for informational purposes.
  16. This document is a product of the Internet Engineering Task Force
  17. (IETF). It represents the consensus of the IETF community. It has
  18. received public review and has been approved for publication by the
  19. Internet Engineering Steering Group (IESG). Not all documents
  20. approved by the IESG are a candidate for any level of Internet
  21. Standard; see Section 2 of RFC 5741.
  22. Information about the current status of this document, any errata,
  23. and how to provide feedback on it may be obtained at
  24. http://www.rfc-editor.org/info/rfc5849.
  25. Copyright Notice
  26. Copyright (c) 2010 IETF Trust and the persons identified as the
  27. document authors. All rights reserved.
  28. This document is subject to BCP 78 and the IETF Trust's Legal
  29. Provisions Relating to IETF Documents
  30. (http://trustee.ietf.org/license-info) in effect on the date of
  31. publication of this document. Please review these documents
  32. carefully, as they describe your rights and restrictions with respect
  33. to this document. Code Components extracted from this document must
  34. include Simplified BSD License text as described in Section 4.e of
  35. the Trust Legal Provisions and are provided without warranty as
  36. described in the Simplified BSD License.
  37. Hammer-Lahav Informational [Page 1]
  38. RFC 5849 OAuth 1.0 April 2010
  39. Table of Contents
  40. 1. Introduction ....................................................3
  41. 1.1. Terminology ................................................4
  42. 1.2. Example ....................................................5
  43. 1.3. Notational Conventions .....................................7
  44. 2. Redirection-Based Authorization .................................8
  45. 2.1. Temporary Credentials ......................................9
  46. 2.2. Resource Owner Authorization ..............................10
  47. 2.3. Token Credentials .........................................12
  48. 3. Authenticated Requests .........................................14
  49. 3.1. Making Requests ...........................................14
  50. 3.2. Verifying Requests ........................................16
  51. 3.3. Nonce and Timestamp .......................................17
  52. 3.4. Signature .................................................18
  53. 3.4.1. Signature Base String ..............................18
  54. 3.4.2. HMAC-SHA1 ..........................................25
  55. 3.4.3. RSA-SHA1 ...........................................25
  56. 3.4.4. PLAINTEXT ..........................................26
  57. 3.5. Parameter Transmission ....................................26
  58. 3.5.1. Authorization Header ...............................27
  59. 3.5.2. Form-Encoded Body ..................................28
  60. 3.5.3. Request URI Query ..................................28
  61. 3.6. Percent Encoding ..........................................29
  62. 4. Security Considerations ........................................29
  63. 4.1. RSA-SHA1 Signature Method .................................29
  64. 4.2. Confidentiality of Requests ...............................30
  65. 4.3. Spoofing by Counterfeit Servers ...........................30
  66. 4.4. Proxying and Caching of Authenticated Content .............30
  67. 4.5. Plaintext Storage of Credentials ..........................30
  68. 4.6. Secrecy of the Client Credentials .........................31
  69. 4.7. Phishing Attacks ..........................................31
  70. 4.8. Scoping of Access Requests ................................31
  71. 4.9. Entropy of Secrets ........................................32
  72. 4.10. Denial-of-Service / Resource-Exhaustion Attacks ..........32
  73. 4.11. SHA-1 Cryptographic Attacks ..............................33
  74. 4.12. Signature Base String Limitations ........................33
  75. 4.13. Cross-Site Request Forgery (CSRF) ........................33
  76. 4.14. User Interface Redress ...................................34
  77. 4.15. Automatic Processing of Repeat Authorizations ............34
  78. 5. Acknowledgments ................................................35
  79. Appendix A. Differences from the Community Edition ...............36
  80. 6. References .....................................................37
  81. 6.1. Normative References ......................................37
  82. 6.2. Informative References ....................................38
  83. Hammer-Lahav Informational [Page 2]
  84. RFC 5849 OAuth 1.0 April 2010
  85. 1. Introduction
  86. The OAuth protocol was originally created by a small community of web
  87. developers from a variety of websites and other Internet services who
  88. wanted to solve the common problem of enabling delegated access to
  89. protected resources. The resulting OAuth protocol was stabilized at
  90. version 1.0 in October 2007, and revised in June 2009 (Revision A) as
  91. published at <http://oauth.net/core/1.0a>.
  92. This specification provides an informational documentation of OAuth
  93. Core 1.0 Revision A, addresses several errata reported since that
  94. time, and makes numerous editorial clarifications. While this
  95. specification is not an item of the IETF's OAuth Working Group, which
  96. at the time of writing is working on an OAuth version that can be
  97. appropriate for publication on the standards track, it has been
  98. transferred to the IETF for change control by authors of the original
  99. work.
  100. In the traditional client-server authentication model, the client
  101. uses its credentials to access its resources hosted by the server.
  102. With the increasing use of distributed web services and cloud
  103. computing, third-party applications require access to these server-
  104. hosted resources.
  105. OAuth introduces a third role to the traditional client-server
  106. authentication model: the resource owner. In the OAuth model, the
  107. client (which is not the resource owner, but is acting on its behalf)
  108. requests access to resources controlled by the resource owner, but
  109. hosted by the server. In addition, OAuth allows the server to verify
  110. not only the resource owner authorization, but also the identity of
  111. the client making the request.
  112. OAuth provides a method for clients to access server resources on
  113. behalf of a resource owner (such as a different client or an end-
  114. user). It also provides a process for end-users to authorize third-
  115. party access to their server resources without sharing their
  116. credentials (typically, a username and password pair), using user-
  117. agent redirections.
  118. For example, a web user (resource owner) can grant a printing service
  119. (client) access to her private photos stored at a photo sharing
  120. service (server), without sharing her username and password with the
  121. printing service. Instead, she authenticates directly with the photo
  122. sharing service which issues the printing service delegation-specific
  123. credentials.
  124. Hammer-Lahav Informational [Page 3]
  125. RFC 5849 OAuth 1.0 April 2010
  126. In order for the client to access resources, it first has to obtain
  127. permission from the resource owner. This permission is expressed in
  128. the form of a token and matching shared-secret. The purpose of the
  129. token is to make it unnecessary for the resource owner to share its
  130. credentials with the client. Unlike the resource owner credentials,
  131. tokens can be issued with a restricted scope and limited lifetime,
  132. and revoked independently.
  133. This specification consists of two parts. The first part defines a
  134. redirection-based user-agent process for end-users to authorize
  135. client access to their resources, by authenticating directly with the
  136. server and provisioning tokens to the client for use with the
  137. authentication method. The second part defines a method for making
  138. authenticated HTTP [RFC2616] requests using two sets of credentials,
  139. one identifying the client making the request, and a second
  140. identifying the resource owner on whose behalf the request is being
  141. made.
  142. The use of OAuth with any transport protocol other than [RFC2616] is
  143. undefined.
  144. 1.1. Terminology
  145. client
  146. An HTTP client (per [RFC2616]) capable of making OAuth-
  147. authenticated requests (Section 3).
  148. server
  149. An HTTP server (per [RFC2616]) capable of accepting OAuth-
  150. authenticated requests (Section 3).
  151. protected resource
  152. An access-restricted resource that can be obtained from the
  153. server using an OAuth-authenticated request (Section 3).
  154. resource owner
  155. An entity capable of accessing and controlling protected
  156. resources by using credentials to authenticate with the server.
  157. credentials
  158. Credentials are a pair of a unique identifier and a matching
  159. shared secret. OAuth defines three classes of credentials:
  160. client, temporary, and token, used to identify and authenticate
  161. the client making the request, the authorization request, and
  162. the access grant, respectively.
  163. Hammer-Lahav Informational [Page 4]
  164. RFC 5849 OAuth 1.0 April 2010
  165. token
  166. A unique identifier issued by the server and used by the client
  167. to associate authenticated requests with the resource owner
  168. whose authorization is requested or has been obtained by the
  169. client. Tokens have a matching shared-secret that is used by
  170. the client to establish its ownership of the token, and its
  171. authority to represent the resource owner.
  172. The original community specification used a somewhat different
  173. terminology that maps to this specifications as follows (original
  174. community terms provided on left):
  175. Consumer: client
  176. Service Provider: server
  177. User: resource owner
  178. Consumer Key and Secret: client credentials
  179. Request Token and Secret: temporary credentials
  180. Access Token and Secret: token credentials
  181. 1.2. Example
  182. Jane (resource owner) has recently uploaded some private vacation
  183. photos (protected resources) to her photo sharing site
  184. 'photos.example.net' (server). She would like to use the
  185. 'printer.example.com' website (client) to print one of these photos.
  186. Typically, Jane signs into 'photos.example.net' using her username
  187. and password.
  188. However, Jane does not wish to share her username and password with
  189. the 'printer.example.com' website, which needs to access the photo in
  190. order to print it. In order to provide its users with better
  191. service, 'printer.example.com' has signed up for a set of
  192. 'photos.example.net' client credentials ahead of time:
  193. Client Identifier
  194. dpf43f3p2l4k3l03
  195. Client Shared-Secret:
  196. kd94hf93k423kf44
  197. The 'printer.example.com' website has also configured its application
  198. to use the protocol endpoints listed in the 'photos.example.net' API
  199. documentation, which use the "HMAC-SHA1" signature method:
  200. Hammer-Lahav Informational [Page 5]
  201. RFC 5849 OAuth 1.0 April 2010
  202. Temporary Credential Request
  203. https://photos.example.net/initiate
  204. Resource Owner Authorization URI:
  205. https://photos.example.net/authorize
  206. Token Request URI:
  207. https://photos.example.net/token
  208. Before 'printer.example.com' can ask Jane to grant it access to the
  209. photos, it must first establish a set of temporary credentials with
  210. 'photos.example.net' to identify the delegation request. To do so,
  211. the client sends the following HTTPS [RFC2818] request to the server:
  212. POST /initiate HTTP/1.1
  213. Host: photos.example.net
  214. Authorization: OAuth realm="Photos",
  215. oauth_consumer_key="dpf43f3p2l4k3l03",
  216. oauth_signature_method="HMAC-SHA1",
  217. oauth_timestamp="137131200",
  218. oauth_nonce="wIjqoS",
  219. oauth_callback="http%3A%2F%2Fprinter.example.com%2Fready",
  220. oauth_signature="74KNZJeDHnMBp0EMJ9ZHt%2FXKycU%3D"
  221. The server validates the request and replies with a set of temporary
  222. credentials in the body of the HTTP response (line breaks are for
  223. display purposes only):
  224. HTTP/1.1 200 OK
  225. Content-Type: application/x-www-form-urlencoded
  226. oauth_token=hh5s93j4hdidpola&oauth_token_secret=hdhd0244k9j7ao03&
  227. oauth_callback_confirmed=true
  228. The client redirects Jane's user-agent to the server's Resource Owner
  229. Authorization endpoint to obtain Jane's approval for accessing her
  230. private photos:
  231. https://photos.example.net/authorize?oauth_token=hh5s93j4hdidpola
  232. The server requests Jane to sign in using her username and password
  233. and if successful, asks her to approve granting 'printer.example.com'
  234. access to her private photos. Jane approves the request and her
  235. user-agent is redirected to the callback URI provided by the client
  236. in the previous request (line breaks are for display purposes only):
  237. http://printer.example.com/ready?
  238. oauth_token=hh5s93j4hdidpola&oauth_verifier=hfdp7dh39dks9884
  239. Hammer-Lahav Informational [Page 6]
  240. RFC 5849 OAuth 1.0 April 2010
  241. The callback request informs the client that Jane completed the
  242. authorization process. The client then requests a set of token
  243. credentials using its temporary credentials (over a secure Transport
  244. Layer Security (TLS) channel):
  245. POST /token HTTP/1.1
  246. Host: photos.example.net
  247. Authorization: OAuth realm="Photos",
  248. oauth_consumer_key="dpf43f3p2l4k3l03",
  249. oauth_token="hh5s93j4hdidpola",
  250. oauth_signature_method="HMAC-SHA1",
  251. oauth_timestamp="137131201",
  252. oauth_nonce="walatlh",
  253. oauth_verifier="hfdp7dh39dks9884",
  254. oauth_signature="gKgrFCywp7rO0OXSjdot%2FIHF7IU%3D"
  255. The server validates the request and replies with a set of token
  256. credentials in the body of the HTTP response:
  257. HTTP/1.1 200 OK
  258. Content-Type: application/x-www-form-urlencoded
  259. oauth_token=nnch734d00sl2jdk&oauth_token_secret=pfkkdhi9sl3r4s00
  260. With a set of token credentials, the client is now ready to request
  261. the private photo:
  262. GET /photos?file=vacation.jpg&size=original HTTP/1.1
  263. Host: photos.example.net
  264. Authorization: OAuth realm="Photos",
  265. oauth_consumer_key="dpf43f3p2l4k3l03",
  266. oauth_token="nnch734d00sl2jdk",
  267. oauth_signature_method="HMAC-SHA1",
  268. oauth_timestamp="137131202",
  269. oauth_nonce="chapoH",
  270. oauth_signature="MdpQcU8iPSUjWoN%2FUDMsK2sui9I%3D"
  271. The 'photos.example.net' server validates the request and responds
  272. with the requested photo. 'printer.example.com' is able to continue
  273. accessing Jane's private photos using the same set of token
  274. credentials for the duration of Jane's authorization, or until Jane
  275. revokes access.
  276. 1.3. Notational Conventions
  277. The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
  278. "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
  279. document are to be interpreted as described in [RFC2119].
  280. Hammer-Lahav Informational [Page 7]
  281. RFC 5849 OAuth 1.0 April 2010
  282. 2. Redirection-Based Authorization
  283. OAuth uses tokens to represent the authorization granted to the
  284. client by the resource owner. Typically, token credentials are
  285. issued by the server at the resource owner's request, after
  286. authenticating the resource owner's identity (usually using a
  287. username and password).
  288. There are many ways in which a server can facilitate the provisioning
  289. of token credentials. This section defines one such way, using HTTP
  290. redirections and the resource owner's user-agent. This redirection-
  291. based authorization method includes three steps:
  292. 1. The client obtains a set of temporary credentials from the server
  293. (in the form of an identifier and shared-secret). The temporary
  294. credentials are used to identify the access request throughout
  295. the authorization process.
  296. 2. The resource owner authorizes the server to grant the client's
  297. access request (identified by the temporary credentials).
  298. 3. The client uses the temporary credentials to request a set of
  299. token credentials from the server, which will enable it to access
  300. the resource owner's protected resources.
  301. The server MUST revoke the temporary credentials after being used
  302. once to obtain the token credentials. It is RECOMMENDED that the
  303. temporary credentials have a limited lifetime. Servers SHOULD enable
  304. resource owners to revoke token credentials after they have been
  305. issued to clients.
  306. In order for the client to perform these steps, the server needs to
  307. advertise the URIs of the following three endpoints:
  308. Temporary Credential Request
  309. The endpoint used by the client to obtain a set of temporary
  310. credentials as described in Section 2.1.
  311. Resource Owner Authorization
  312. The endpoint to which the resource owner is redirected to grant
  313. authorization as described in Section 2.2.
  314. Token Request
  315. The endpoint used by the client to request a set of token
  316. credentials using the set of temporary credentials as described
  317. in Section 2.3.
  318. Hammer-Lahav Informational [Page 8]
  319. RFC 5849 OAuth 1.0 April 2010
  320. The three URIs advertised by the server MAY include a query component
  321. as defined by [RFC3986], Section 3, but if present, the query MUST
  322. NOT contain any parameters beginning with the "oauth_" prefix, to
  323. avoid conflicts with the protocol parameters added to the URIs when
  324. used.
  325. The methods in which the server advertises and documents its three
  326. endpoints are beyond the scope of this specification. Clients should
  327. avoid making assumptions about the size of tokens and other server-
  328. generated values, which are left undefined by this specification. In
  329. addition, protocol parameters MAY include values that require
  330. encoding when transmitted. Clients and servers should not make
  331. assumptions about the possible range of their values.
  332. 2.1. Temporary Credentials
  333. The client obtains a set of temporary credentials from the server by
  334. making an authenticated (Section 3) HTTP "POST" request to the
  335. Temporary Credential Request endpoint (unless the server advertises
  336. another HTTP request method for the client to use). The client
  337. constructs a request URI by adding the following REQUIRED parameter
  338. to the request (in addition to the other protocol parameters, using
  339. the same parameter transmission method):
  340. oauth_callback: An absolute URI back to which the server will
  341. redirect the resource owner when the Resource Owner
  342. Authorization step (Section 2.2) is completed. If
  343. the client is unable to receive callbacks or a
  344. callback URI has been established via other means,
  345. the parameter value MUST be set to "oob" (case
  346. sensitive), to indicate an out-of-band
  347. configuration.
  348. Servers MAY specify additional parameters.
  349. When making the request, the client authenticates using only the
  350. client credentials. The client MAY omit the empty "oauth_token"
  351. protocol parameter from the request and MUST use the empty string as
  352. the token secret value.
  353. Since the request results in the transmission of plain text
  354. credentials in the HTTP response, the server MUST require the use of
  355. a transport-layer mechanisms such as TLS or Secure Socket Layer (SSL)
  356. (or a secure channel with equivalent protections).
  357. Hammer-Lahav Informational [Page 9]
  358. RFC 5849 OAuth 1.0 April 2010
  359. For example, the client makes the following HTTPS request:
  360. POST /request_temp_credentials HTTP/1.1
  361. Host: server.example.com
  362. Authorization: OAuth realm="Example",
  363. oauth_consumer_key="jd83jd92dhsh93js",
  364. oauth_signature_method="PLAINTEXT",
  365. oauth_callback="http%3A%2F%2Fclient.example.net%2Fcb%3Fx%3D1",
  366. oauth_signature="ja893SD9%26"
  367. The server MUST verify (Section 3.2) the request and if valid,
  368. respond back to the client with a set of temporary credentials (in
  369. the form of an identifier and shared-secret). The temporary
  370. credentials are included in the HTTP response body using the
  371. "application/x-www-form-urlencoded" content type as defined by
  372. [W3C.REC-html40-19980424] with a 200 status code (OK).
  373. The response contains the following REQUIRED parameters:
  374. oauth_token
  375. The temporary credentials identifier.
  376. oauth_token_secret
  377. The temporary credentials shared-secret.
  378. oauth_callback_confirmed
  379. MUST be present and set to "true". The parameter is used to
  380. differentiate from previous versions of the protocol.
  381. Note that even though the parameter names include the term 'token',
  382. these credentials are not token credentials, but are used in the next
  383. two steps in a similar manner to token credentials.
  384. For example (line breaks are for display purposes only):
  385. HTTP/1.1 200 OK
  386. Content-Type: application/x-www-form-urlencoded
  387. oauth_token=hdk48Djdsa&oauth_token_secret=xyz4992k83j47x0b&
  388. oauth_callback_confirmed=true
  389. 2.2. Resource Owner Authorization
  390. Before the client requests a set of token credentials from the
  391. server, it MUST send the user to the server to authorize the request.
  392. The client constructs a request URI by adding the following REQUIRED
  393. query parameter to the Resource Owner Authorization endpoint URI:
  394. Hammer-Lahav Informational [Page 10]
  395. RFC 5849 OAuth 1.0 April 2010
  396. oauth_token
  397. The temporary credentials identifier obtained in Section 2.1 in
  398. the "oauth_token" parameter. Servers MAY declare this
  399. parameter as OPTIONAL, in which case they MUST provide a way
  400. for the resource owner to indicate the identifier through other
  401. means.
  402. Servers MAY specify additional parameters.
  403. The client directs the resource owner to the constructed URI using an
  404. HTTP redirection response, or by other means available to it via the
  405. resource owner's user-agent. The request MUST use the HTTP "GET"
  406. method.
  407. For example, the client redirects the resource owner's user-agent to
  408. make the following HTTPS request:
  409. GET /authorize_access?oauth_token=hdk48Djdsa HTTP/1.1
  410. Host: server.example.com
  411. The way in which the server handles the authorization request,
  412. including whether it uses a secure channel such as TLS/SSL is beyond
  413. the scope of this specification. However, the server MUST first
  414. verify the identity of the resource owner.
  415. When asking the resource owner to authorize the requested access, the
  416. server SHOULD present to the resource owner information about the
  417. client requesting access based on the association of the temporary
  418. credentials with the client identity. When displaying any such
  419. information, the server SHOULD indicate if the information has been
  420. verified.
  421. After receiving an authorization decision from the resource owner,
  422. the server redirects the resource owner to the callback URI if one
  423. was provided in the "oauth_callback" parameter or by other means.
  424. To make sure that the resource owner granting access is the same
  425. resource owner returning back to the client to complete the process,
  426. the server MUST generate a verification code: an unguessable value
  427. passed to the client via the resource owner and REQUIRED to complete
  428. the process. The server constructs the request URI by adding the
  429. following REQUIRED parameters to the callback URI query component:
  430. oauth_token
  431. The temporary credentials identifier received from the client.
  432. Hammer-Lahav Informational [Page 11]
  433. RFC 5849 OAuth 1.0 April 2010
  434. oauth_verifier
  435. The verification code.
  436. If the callback URI already includes a query component, the server
  437. MUST append the OAuth parameters to the end of the existing query.
  438. For example, the server redirects the resource owner's user-agent to
  439. make the following HTTP request:
  440. GET /cb?x=1&oauth_token=hdk48Djdsa&oauth_verifier=473f82d3 HTTP/1.1
  441. Host: client.example.net
  442. If the client did not provide a callback URI, the server SHOULD
  443. display the value of the verification code, and instruct the resource
  444. owner to manually inform the client that authorization is completed.
  445. If the server knows a client to be running on a limited device, it
  446. SHOULD ensure that the verifier value is suitable for manual entry.
  447. 2.3. Token Credentials
  448. The client obtains a set of token credentials from the server by
  449. making an authenticated (Section 3) HTTP "POST" request to the Token
  450. Request endpoint (unless the server advertises another HTTP request
  451. method for the client to use). The client constructs a request URI
  452. by adding the following REQUIRED parameter to the request (in
  453. addition to the other protocol parameters, using the same parameter
  454. transmission method):
  455. oauth_verifier
  456. The verification code received from the server in the previous
  457. step.
  458. When making the request, the client authenticates using the client
  459. credentials as well as the temporary credentials. The temporary
  460. credentials are used as a substitute for token credentials in the
  461. authenticated request and transmitted using the "oauth_token"
  462. parameter.
  463. Since the request results in the transmission of plain text
  464. credentials in the HTTP response, the server MUST require the use of
  465. a transport-layer mechanism such as TLS or SSL (or a secure channel
  466. with equivalent protections).
  467. Hammer-Lahav Informational [Page 12]
  468. RFC 5849 OAuth 1.0 April 2010
  469. For example, the client makes the following HTTPS request:
  470. POST /request_token HTTP/1.1
  471. Host: server.example.com
  472. Authorization: OAuth realm="Example",
  473. oauth_consumer_key="jd83jd92dhsh93js",
  474. oauth_token="hdk48Djdsa",
  475. oauth_signature_method="PLAINTEXT",
  476. oauth_verifier="473f82d3",
  477. oauth_signature="ja893SD9%26xyz4992k83j47x0b"
  478. The server MUST verify (Section 3.2) the validity of the request,
  479. ensure that the resource owner has authorized the provisioning of
  480. token credentials to the client, and ensure that the temporary
  481. credentials have not expired or been used before. The server MUST
  482. also verify the verification code received from the client. If the
  483. request is valid and authorized, the token credentials are included
  484. in the HTTP response body using the
  485. "application/x-www-form-urlencoded" content type as defined by
  486. [W3C.REC-html40-19980424] with a 200 status code (OK).
  487. The response contains the following REQUIRED parameters:
  488. oauth_token
  489. The token identifier.
  490. oauth_token_secret
  491. The token shared-secret.
  492. For example:
  493. HTTP/1.1 200 OK
  494. Content-Type: application/x-www-form-urlencoded
  495. oauth_token=j49ddk933skd9dks&oauth_token_secret=ll399dj47dskfjdk
  496. The server must retain the scope, duration, and other attributes
  497. approved by the resource owner, and enforce these restrictions when
  498. receiving a client request made with the token credentials issued.
  499. Once the client receives and stores the token credentials, it can
  500. proceed to access protected resources on behalf of the resource owner
  501. by making authenticated requests (Section 3) using the client
  502. credentials together with the token credentials received.
  503. Hammer-Lahav Informational [Page 13]
  504. RFC 5849 OAuth 1.0 April 2010
  505. 3. Authenticated Requests
  506. The HTTP authentication methods defined by [RFC2617] enable clients
  507. to make authenticated HTTP requests. Clients using these methods
  508. gain access to protected resources by using their credentials
  509. (typically, a username and password pair), which allow the server to
  510. verify their authenticity. Using these methods for delegation
  511. requires the client to assume the role of the resource owner.
  512. OAuth provides a method designed to include two sets of credentials
  513. with each request, one to identify the client, and another to
  514. identify the resource owner. Before a client can make authenticated
  515. requests on behalf of the resource owner, it must obtain a token
  516. authorized by the resource owner. Section 2 provides one such method
  517. through which the client can obtain a token authorized by the
  518. resource owner.
  519. The client credentials take the form of a unique identifier and an
  520. associated shared-secret or RSA key pair. Prior to making
  521. authenticated requests, the client establishes a set of credentials
  522. with the server. The process and requirements for provisioning these
  523. are outside the scope of this specification. Implementers are urged
  524. to consider the security ramifications of using client credentials,
  525. some of which are described in Section 4.6.
  526. Making authenticated requests requires prior knowledge of the
  527. server's configuration. OAuth includes multiple methods for
  528. transmitting protocol parameters with requests (Section 3.5), as well
  529. as multiple methods for the client to prove its rightful ownership of
  530. the credentials used (Section 3.4). The way in which clients
  531. discover the required configuration is outside the scope of this
  532. specification.
  533. 3.1. Making Requests
  534. An authenticated request includes several protocol parameters. Each
  535. parameter name begins with the "oauth_" prefix, and the parameter
  536. names and values are case sensitive. Clients make authenticated
  537. requests by calculating the values of a set of protocol parameters
  538. and adding them to the HTTP request as follows:
  539. 1. The client assigns value to each of these REQUIRED (unless
  540. specified otherwise) protocol parameters:
  541. Hammer-Lahav Informational [Page 14]
  542. RFC 5849 OAuth 1.0 April 2010
  543. oauth_consumer_key
  544. The identifier portion of the client credentials (equivalent to
  545. a username). The parameter name reflects a deprecated term
  546. (Consumer Key) used in previous revisions of the specification,
  547. and has been retained to maintain backward compatibility.
  548. oauth_token
  549. The token value used to associate the request with the resource
  550. owner. If the request is not associated with a resource owner
  551. (no token available), clients MAY omit the parameter.
  552. oauth_signature_method
  553. The name of the signature method used by the client to sign the
  554. request, as defined in Section 3.4.
  555. oauth_timestamp
  556. The timestamp value as defined in Section 3.3. The parameter
  557. MAY be omitted when using the "PLAINTEXT" signature method.
  558. oauth_nonce
  559. The nonce value as defined in Section 3.3. The parameter MAY
  560. be omitted when using the "PLAINTEXT" signature method.
  561. oauth_version
  562. OPTIONAL. If present, MUST be set to "1.0". Provides the
  563. version of the authentication process as defined in this
  564. specification.
  565. 2. The protocol parameters are added to the request using one of the
  566. transmission methods listed in Section 3.5. Each parameter MUST
  567. NOT appear more than once per request.
  568. 3. The client calculates and assigns the value of the
  569. "oauth_signature" parameter as described in Section 3.4 and adds
  570. the parameter to the request using the same method as in the
  571. previous step.
  572. 4. The client sends the authenticated HTTP request to the server.
  573. For example, to make the following HTTP request authenticated (the
  574. "c2&a3=2+q" string in the following examples is used to illustrate
  575. the impact of a form-encoded entity-body):
  576. POST /request?b5=%3D%253D&a3=a&c%40=&a2=r%20b HTTP/1.1
  577. Host: example.com
  578. Content-Type: application/x-www-form-urlencoded
  579. c2&a3=2+q
  580. Hammer-Lahav Informational [Page 15]
  581. RFC 5849 OAuth 1.0 April 2010
  582. The client assigns values to the following protocol parameters using
  583. its client credentials, token credentials, the current timestamp, a
  584. uniquely generated nonce, and indicates that it will use the
  585. "HMAC-SHA1" signature method:
  586. oauth_consumer_key: 9djdj82h48djs9d2
  587. oauth_token: kkk9d7dh3k39sjv7
  588. oauth_signature_method: HMAC-SHA1
  589. oauth_timestamp: 137131201
  590. oauth_nonce: 7d8f3e4a
  591. The client adds the protocol parameters to the request using the
  592. OAuth HTTP "Authorization" header field:
  593. Authorization: OAuth realm="Example",
  594. oauth_consumer_key="9djdj82h48djs9d2",
  595. oauth_token="kkk9d7dh3k39sjv7",
  596. oauth_signature_method="HMAC-SHA1",
  597. oauth_timestamp="137131201",
  598. oauth_nonce="7d8f3e4a"
  599. Then, it calculates the value of the "oauth_signature" parameter
  600. (using client secret "j49sk3j29djd" and token secret "dh893hdasih9"),
  601. adds it to the request, and sends the HTTP request to the server:
  602. POST /request?b5=%3D%253D&a3=a&c%40=&a2=r%20b HTTP/1.1
  603. Host: example.com
  604. Content-Type: application/x-www-form-urlencoded
  605. Authorization: OAuth realm="Example",
  606. oauth_consumer_key="9djdj82h48djs9d2",
  607. oauth_token="kkk9d7dh3k39sjv7",
  608. oauth_signature_method="HMAC-SHA1",
  609. oauth_timestamp="137131201",
  610. oauth_nonce="7d8f3e4a",
  611. oauth_signature="bYT5CMsGcbgUdFHObYMEfcx6bsw%3D"
  612. c2&a3=2+q
  613. 3.2. Verifying Requests
  614. Servers receiving an authenticated request MUST validate it by:
  615. o Recalculating the request signature independently as described in
  616. Section 3.4 and comparing it to the value received from the client
  617. via the "oauth_signature" parameter.
  618. Hammer-Lahav Informational [Page 16]
  619. RFC 5849 OAuth 1.0 April 2010
  620. o If using the "HMAC-SHA1" or "RSA-SHA1" signature methods, ensuring
  621. that the combination of nonce/timestamp/token (if present)
  622. received from the client has not been used before in a previous
  623. request (the server MAY reject requests with stale timestamps as
  624. described in Section 3.3).
  625. o If a token is present, verifying the scope and status of the
  626. client authorization as represented by the token (the server MAY
  627. choose to restrict token usage to the client to which it was
  628. issued).
  629. o If the "oauth_version" parameter is present, ensuring its value is
  630. "1.0".
  631. If the request fails verification, the server SHOULD respond with the
  632. appropriate HTTP response status code. The server MAY include
  633. further details about why the request was rejected in the response
  634. body.
  635. The server SHOULD return a 400 (Bad Request) status code when
  636. receiving a request with unsupported parameters, an unsupported
  637. signature method, missing parameters, or duplicated protocol
  638. parameters. The server SHOULD return a 401 (Unauthorized) status
  639. code when receiving a request with invalid client credentials, an
  640. invalid or expired token, an invalid signature, or an invalid or used
  641. nonce.
  642. 3.3. Nonce and Timestamp
  643. The timestamp value MUST be a positive integer. Unless otherwise
  644. specified by the server's documentation, the timestamp is expressed
  645. in the number of seconds since January 1, 1970 00:00:00 GMT.
  646. A nonce is a random string, uniquely generated by the client to allow
  647. the server to verify that a request has never been made before and
  648. helps prevent replay attacks when requests are made over a non-secure
  649. channel. The nonce value MUST be unique across all requests with the
  650. same timestamp, client credentials, and token combinations.
  651. To avoid the need to retain an infinite number of nonce values for
  652. future checks, servers MAY choose to restrict the time period after
  653. which a request with an old timestamp is rejected. Note that this
  654. restriction implies a level of synchronization between the client's
  655. and server's clocks. Servers applying such a restriction MAY provide
  656. a way for the client to sync with the server's clock; alternatively,
  657. both systems could synchronize with a trusted time service. Details
  658. of clock synchronization strategies are beyond the scope of this
  659. specification.
  660. Hammer-Lahav Informational [Page 17]
  661. RFC 5849 OAuth 1.0 April 2010
  662. 3.4. Signature
  663. OAuth-authenticated requests can have two sets of credentials: those
  664. passed via the "oauth_consumer_key" parameter and those in the
  665. "oauth_token" parameter. In order for the server to verify the
  666. authenticity of the request and prevent unauthorized access, the
  667. client needs to prove that it is the rightful owner of the
  668. credentials. This is accomplished using the shared-secret (or RSA
  669. key) part of each set of credentials.
  670. OAuth provides three methods for the client to prove its rightful
  671. ownership of the credentials: "HMAC-SHA1", "RSA-SHA1", and
  672. "PLAINTEXT". These methods are generally referred to as signature
  673. methods, even though "PLAINTEXT" does not involve a signature. In
  674. addition, "RSA-SHA1" utilizes an RSA key instead of the shared-
  675. secrets associated with the client credentials.
  676. OAuth does not mandate a particular signature method, as each
  677. implementation can have its own unique requirements. Servers are
  678. free to implement and document their own custom methods.
  679. Recommending any particular method is beyond the scope of this
  680. specification. Implementers should review the Security
  681. Considerations section (Section 4) before deciding on which method to
  682. support.
  683. The client declares which signature method is used via the
  684. "oauth_signature_method" parameter. It then generates a signature
  685. (or a string of an equivalent value) and includes it in the
  686. "oauth_signature" parameter. The server verifies the signature as
  687. specified for each method.
  688. The signature process does not change the request or its parameters,
  689. with the exception of the "oauth_signature" parameter.
  690. 3.4.1. Signature Base String
  691. The signature base string is a consistent, reproducible concatenation
  692. of several of the HTTP request elements into a single string. The
  693. string is used as an input to the "HMAC-SHA1" and "RSA-SHA1"
  694. signature methods.
  695. The signature base string includes the following components of the
  696. HTTP request:
  697. o The HTTP request method (e.g., "GET", "POST", etc.).
  698. o The authority as declared by the HTTP "Host" request header field.
  699. Hammer-Lahav Informational [Page 18]
  700. RFC 5849 OAuth 1.0 April 2010
  701. o The path and query components of the request resource URI.
  702. o The protocol parameters excluding the "oauth_signature".
  703. o Parameters included in the request entity-body if they comply with
  704. the strict restrictions defined in Section 3.4.1.3.
  705. The signature base string does not cover the entire HTTP request.
  706. Most notably, it does not include the entity-body in most requests,
  707. nor does it include most HTTP entity-headers. It is important to
  708. note that the server cannot verify the authenticity of the excluded
  709. request components without using additional protections such as SSL/
  710. TLS or other methods.
  711. 3.4.1.1. String Construction
  712. The signature base string is constructed by concatenating together,
  713. in order, the following HTTP request elements:
  714. 1. The HTTP request method in uppercase. For example: "HEAD",
  715. "GET", "POST", etc. If the request uses a custom HTTP method, it
  716. MUST be encoded (Section 3.6).
  717. 2. An "&" character (ASCII code 38).
  718. 3. The base string URI from Section 3.4.1.2, after being encoded
  719. (Section 3.6).
  720. 4. An "&" character (ASCII code 38).
  721. 5. The request parameters as normalized in Section 3.4.1.3.2, after
  722. being encoded (Section 3.6).
  723. For example, the HTTP request:
  724. POST /request?b5=%3D%253D&a3=a&c%40=&a2=r%20b HTTP/1.1
  725. Host: example.com
  726. Content-Type: application/x-www-form-urlencoded
  727. Authorization: OAuth realm="Example",
  728. oauth_consumer_key="9djdj82h48djs9d2",
  729. oauth_token="kkk9d7dh3k39sjv7",
  730. oauth_signature_method="HMAC-SHA1",
  731. oauth_timestamp="137131201",
  732. oauth_nonce="7d8f3e4a",
  733. oauth_signature="bYT5CMsGcbgUdFHObYMEfcx6bsw%3D"
  734. c2&a3=2+q
  735. Hammer-Lahav Informational [Page 19]
  736. RFC 5849 OAuth 1.0 April 2010
  737. is represented by the following signature base string (line breaks
  738. are for display purposes only):
  739. POST&http%3A%2F%2Fexample.com%2Frequest&a2%3Dr%2520b%26a3%3D2%2520q
  740. %26a3%3Da%26b5%3D%253D%25253D%26c%2540%3D%26c2%3D%26oauth_consumer_
  741. key%3D9djdj82h48djs9d2%26oauth_nonce%3D7d8f3e4a%26oauth_signature_m
  742. ethod%3DHMAC-SHA1%26oauth_timestamp%3D137131201%26oauth_token%3Dkkk
  743. 9d7dh3k39sjv7
  744. 3.4.1.2. Base String URI
  745. The scheme, authority, and path of the request resource URI [RFC3986]
  746. are included by constructing an "http" or "https" URI representing
  747. the request resource (without the query or fragment) as follows:
  748. 1. The scheme and host MUST be in lowercase.
  749. 2. The host and port values MUST match the content of the HTTP
  750. request "Host" header field.
  751. 3. The port MUST be included if it is not the default port for the
  752. scheme, and MUST be excluded if it is the default. Specifically,
  753. the port MUST be excluded when making an HTTP request [RFC2616]
  754. to port 80 or when making an HTTPS request [RFC2818] to port 443.
  755. All other non-default port numbers MUST be included.
  756. For example, the HTTP request:
  757. GET /r%20v/X?id=123 HTTP/1.1
  758. Host: EXAMPLE.COM:80
  759. is represented by the base string URI: "http://example.com/r%20v/X".
  760. In another example, the HTTPS request:
  761. GET /?q=1 HTTP/1.1
  762. Host: www.example.net:8080
  763. is represented by the base string URI:
  764. "https://www.example.net:8080/".
  765. 3.4.1.3. Request Parameters
  766. In order to guarantee a consistent and reproducible representation of
  767. the request parameters, the parameters are collected and decoded to
  768. their original decoded form. They are then sorted and encoded in a
  769. particular manner that is often different from their original
  770. encoding scheme, and concatenated into a single string.
  771. Hammer-Lahav Informational [Page 20]
  772. RFC 5849 OAuth 1.0 April 2010
  773. 3.4.1.3.1. Parameter Sources
  774. The parameters from the following sources are collected into a single
  775. list of name/value pairs:
  776. o The query component of the HTTP request URI as defined by
  777. [RFC3986], Section 3.4. The query component is parsed into a list
  778. of name/value pairs by treating it as an
  779. "application/x-www-form-urlencoded" string, separating the names
  780. and values and decoding them as defined by
  781. [W3C.REC-html40-19980424], Section 17.13.4.
  782. o The OAuth HTTP "Authorization" header field (Section 3.5.1) if
  783. present. The header's content is parsed into a list of name/value
  784. pairs excluding the "realm" parameter if present. The parameter
  785. values are decoded as defined by Section 3.5.1.
  786. o The HTTP request entity-body, but only if all of the following
  787. conditions are met:
  788. * The entity-body is single-part.
  789. * The entity-body follows the encoding requirements of the
  790. "application/x-www-form-urlencoded" content-type as defined by
  791. [W3C.REC-html40-19980424].
  792. * The HTTP request entity-header includes the "Content-Type"
  793. header field set to "application/x-www-form-urlencoded".
  794. The entity-body is parsed into a list of decoded name/value pairs
  795. as described in [W3C.REC-html40-19980424], Section 17.13.4.
  796. The "oauth_signature" parameter MUST be excluded from the signature
  797. base string if present. Parameters not explicitly included in the
  798. request MUST be excluded from the signature base string (e.g., the
  799. "oauth_version" parameter when omitted).
  800. Hammer-Lahav Informational [Page 21]
  801. RFC 5849 OAuth 1.0 April 2010
  802. For example, the HTTP request:
  803. POST /request?b5=%3D%253D&a3=a&c%40=&a2=r%20b HTTP/1.1
  804. Host: example.com
  805. Content-Type: application/x-www-form-urlencoded
  806. Authorization: OAuth realm="Example",
  807. oauth_consumer_key="9djdj82h48djs9d2",
  808. oauth_token="kkk9d7dh3k39sjv7",
  809. oauth_signature_method="HMAC-SHA1",
  810. oauth_timestamp="137131201",
  811. oauth_nonce="7d8f3e4a",
  812. oauth_signature="djosJKDKJSD8743243%2Fjdk33klY%3D"
  813. c2&a3=2+q
  814. contains the following (fully decoded) parameters used in the
  815. signature base sting:
  816. +------------------------+------------------+
  817. | Name | Value |
  818. +------------------------+------------------+
  819. | b5 | =%3D |
  820. | a3 | a |
  821. | c@ | |
  822. | a2 | r b |
  823. | oauth_consumer_key | 9djdj82h48djs9d2 |
  824. | oauth_token | kkk9d7dh3k39sjv7 |
  825. | oauth_signature_method | HMAC-SHA1 |
  826. | oauth_timestamp | 137131201 |
  827. | oauth_nonce | 7d8f3e4a |
  828. | c2 | |
  829. | a3 | 2 q |
  830. +------------------------+------------------+
  831. Note that the value of "b5" is "=%3D" and not "==". Both "c@" and
  832. "c2" have empty values. While the encoding rules specified in this
  833. specification for the purpose of constructing the signature base
  834. string exclude the use of a "+" character (ASCII code 43) to
  835. represent an encoded space character (ASCII code 32), this practice
  836. is widely used in "application/x-www-form-urlencoded" encoded values,
  837. and MUST be properly decoded, as demonstrated by one of the "a3"
  838. parameter instances (the "a3" parameter is used twice in this
  839. request).
  840. Hammer-Lahav Informational [Page 22]
  841. RFC 5849 OAuth 1.0 April 2010
  842. 3.4.1.3.2. Parameters Normalization
  843. The parameters collected in Section 3.4.1.3 are normalized into a
  844. single string as follows:
  845. 1. First, the name and value of each parameter are encoded
  846. (Section 3.6).
  847. 2. The parameters are sorted by name, using ascending byte value
  848. ordering. If two or more parameters share the same name, they
  849. are sorted by their value.
  850. 3. The name of each parameter is concatenated to its corresponding
  851. value using an "=" character (ASCII code 61) as a separator, even
  852. if the value is empty.
  853. 4. The sorted name/value pairs are concatenated together into a
  854. single string by using an "&" character (ASCII code 38) as
  855. separator.
  856. For example, the list of parameters from the previous section would
  857. be normalized as follows:
  858. Encoded:
  859. +------------------------+------------------+
  860. | Name | Value |
  861. +------------------------+------------------+
  862. | b5 | %3D%253D |
  863. | a3 | a |
  864. | c%40 | |
  865. | a2 | r%20b |
  866. | oauth_consumer_key | 9djdj82h48djs9d2 |
  867. | oauth_token | kkk9d7dh3k39sjv7 |
  868. | oauth_signature_method | HMAC-SHA1 |
  869. | oauth_timestamp | 137131201 |
  870. | oauth_nonce | 7d8f3e4a |
  871. | c2 | |
  872. | a3 | 2%20q |
  873. +------------------------+------------------+
  874. Hammer-Lahav Informational [Page 23]
  875. RFC 5849 OAuth 1.0 April 2010
  876. Sorted:
  877. +------------------------+------------------+
  878. | Name | Value |
  879. +------------------------+------------------+
  880. | a2 | r%20b |
  881. | a3 | 2%20q |
  882. | a3 | a |
  883. | b5 | %3D%253D |
  884. | c%40 | |
  885. | c2 | |
  886. | oauth_consumer_key | 9djdj82h48djs9d2 |
  887. | oauth_nonce | 7d8f3e4a |
  888. | oauth_signature_method | HMAC-SHA1 |
  889. | oauth_timestamp | 137131201 |
  890. | oauth_token | kkk9d7dh3k39sjv7 |
  891. +------------------------+------------------+
  892. Concatenated Pairs:
  893. +-------------------------------------+
  894. | Name=Value |
  895. +-------------------------------------+
  896. | a2=r%20b |
  897. | a3=2%20q |
  898. | a3=a |
  899. | b5=%3D%253D |
  900. | c%40= |
  901. | c2= |
  902. | oauth_consumer_key=9djdj82h48djs9d2 |
  903. | oauth_nonce=7d8f3e4a |
  904. | oauth_signature_method=HMAC-SHA1 |
  905. | oauth_timestamp=137131201 |
  906. | oauth_token=kkk9d7dh3k39sjv7 |
  907. +-------------------------------------+
  908. and concatenated together into a single string (line breaks are for
  909. display purposes only):
  910. a2=r%20b&a3=2%20q&a3=a&b5=%3D%253D&c%40=&c2=&oauth_consumer_key=9dj
  911. dj82h48djs9d2&oauth_nonce=7d8f3e4a&oauth_signature_method=HMAC-SHA1
  912. &oauth_timestamp=137131201&oauth_token=kkk9d7dh3k39sjv7
  913. Hammer-Lahav Informational [Page 24]
  914. RFC 5849 OAuth 1.0 April 2010
  915. 3.4.2. HMAC-SHA1
  916. The "HMAC-SHA1" signature method uses the HMAC-SHA1 signature
  917. algorithm as defined in [RFC2104]:
  918. digest = HMAC-SHA1 (key, text)
  919. The HMAC-SHA1 function variables are used in following way:
  920. text is set to the value of the signature base string from
  921. Section 3.4.1.1.
  922. key is set to the concatenated values of:
  923. 1. The client shared-secret, after being encoded
  924. (Section 3.6).
  925. 2. An "&" character (ASCII code 38), which MUST be included
  926. even when either secret is empty.
  927. 3. The token shared-secret, after being encoded
  928. (Section 3.6).
  929. digest is used to set the value of the "oauth_signature" protocol
  930. parameter, after the result octet string is base64-encoded
  931. per [RFC2045], Section 6.8.
  932. 3.4.3. RSA-SHA1
  933. The "RSA-SHA1" signature method uses the RSASSA-PKCS1-v1_5 signature
  934. algorithm as defined in [RFC3447], Section 8.2 (also known as
  935. PKCS#1), using SHA-1 as the hash function for EMSA-PKCS1-v1_5. To
  936. use this method, the client MUST have established client credentials
  937. with the server that included its RSA public key (in a manner that is
  938. beyond the scope of this specification).
  939. The signature base string is signed using the client's RSA private
  940. key per [RFC3447], Section 8.2.1:
  941. S = RSASSA-PKCS1-V1_5-SIGN (K, M)
  942. Where:
  943. K is set to the client's RSA private key,
  944. M is set to the value of the signature base string from
  945. Section 3.4.1.1, and
  946. Hammer-Lahav Informational [Page 25]
  947. RFC 5849 OAuth 1.0 April 2010
  948. S is the result signature used to set the value of the
  949. "oauth_signature" protocol parameter, after the result octet
  950. string is base64-encoded per [RFC2045] section 6.8.
  951. The server verifies the signature per [RFC3447] section 8.2.2:
  952. RSASSA-PKCS1-V1_5-VERIFY ((n, e), M, S)
  953. Where:
  954. (n, e) is set to the client's RSA public key,
  955. M is set to the value of the signature base string from
  956. Section 3.4.1.1, and
  957. S is set to the octet string value of the "oauth_signature"
  958. protocol parameter received from the client.
  959. 3.4.4. PLAINTEXT
  960. The "PLAINTEXT" method does not employ a signature algorithm. It
  961. MUST be used with a transport-layer mechanism such as TLS or SSL (or
  962. sent over a secure channel with equivalent protections). It does not
  963. utilize the signature base string or the "oauth_timestamp" and
  964. "oauth_nonce" parameters.
  965. The "oauth_signature" protocol parameter is set to the concatenated
  966. value of:
  967. 1. The client shared-secret, after being encoded (Section 3.6).
  968. 2. An "&" character (ASCII code 38), which MUST be included even
  969. when either secret is empty.
  970. 3. The token shared-secret, after being encoded (Section 3.6).
  971. 3.5. Parameter Transmission
  972. When making an OAuth-authenticated request, protocol parameters as
  973. well as any other parameter using the "oauth_" prefix SHALL be
  974. included in the request using one and only one of the following
  975. locations, listed in order of decreasing preference:
  976. 1. The HTTP "Authorization" header field as described in
  977. Section 3.5.1.
  978. 2. The HTTP request entity-body as described in Section 3.5.2.
  979. Hammer-Lahav Informational [Page 26]
  980. RFC 5849 OAuth 1.0 April 2010
  981. 3. The HTTP request URI query as described in Section 3.5.3.
  982. In addition to these three methods, future extensions MAY define
  983. other methods for including protocol parameters in the request.
  984. 3.5.1. Authorization Header
  985. Protocol parameters can be transmitted using the HTTP "Authorization"
  986. header field as defined by [RFC2617] with the auth-scheme name set to
  987. "OAuth" (case insensitive).
  988. For example:
  989. Authorization: OAuth realm="Example",
  990. oauth_consumer_key="0685bd9184jfhq22",
  991. oauth_token="ad180jjd733klru7",
  992. oauth_signature_method="HMAC-SHA1",
  993. oauth_signature="wOJIO9A2W5mFwDgiDvZbTSMK%2FPY%3D",
  994. oauth_timestamp="137131200",
  995. oauth_nonce="4572616e48616d6d65724c61686176",
  996. oauth_version="1.0"
  997. Protocol parameters SHALL be included in the "Authorization" header
  998. field as follows:
  999. 1. Parameter names and values are encoded per Parameter Encoding
  1000. (Section 3.6).
  1001. 2. Each parameter's name is immediately followed by an "=" character
  1002. (ASCII code 61), a """ character (ASCII code 34), the parameter
  1003. value (MAY be empty), and another """ character (ASCII code 34).
  1004. 3. Parameters are separated by a "," character (ASCII code 44) and
  1005. OPTIONAL linear whitespace per [RFC2617].
  1006. 4. The OPTIONAL "realm" parameter MAY be added and interpreted per
  1007. [RFC2617] section 1.2.
  1008. Servers MAY indicate their support for the "OAuth" auth-scheme by
  1009. returning the HTTP "WWW-Authenticate" response header field upon
  1010. client requests for protected resources. As per [RFC2617], such a
  1011. response MAY include additional HTTP "WWW-Authenticate" header
  1012. fields:
  1013. For example:
  1014. WWW-Authenticate: OAuth realm="http://server.example.com/"
  1015. Hammer-Lahav Informational [Page 27]
  1016. RFC 5849 OAuth 1.0 April 2010
  1017. The realm parameter defines a protection realm per [RFC2617], Section
  1018. 1.2.
  1019. 3.5.2. Form-Encoded Body
  1020. Protocol parameters can be transmitted in the HTTP request entity-
  1021. body, but only if the following REQUIRED conditions are met:
  1022. o The entity-body is single-part.
  1023. o The entity-body follows the encoding requirements of the
  1024. "application/x-www-form-urlencoded" content-type as defined by
  1025. [W3C.REC-html40-19980424].
  1026. o The HTTP request entity-header includes the "Content-Type" header
  1027. field set to "application/x-www-form-urlencoded".
  1028. For example (line breaks are for display purposes only):
  1029. oauth_consumer_key=0685bd9184jfhq22&oauth_token=ad180jjd733klr
  1030. u7&oauth_signature_method=HMAC-SHA1&oauth_signature=wOJIO9A2W5
  1031. mFwDgiDvZbTSMK%2FPY%3D&oauth_timestamp=137131200&oauth_nonce=4
  1032. 572616e48616d6d65724c61686176&oauth_version=1.0
  1033. The entity-body MAY include other request-specific parameters, in
  1034. which case, the protocol parameters SHOULD be appended following the
  1035. request-specific parameters, properly separated by an "&" character
  1036. (ASCII code 38).
  1037. 3.5.3. Request URI Query
  1038. Protocol parameters can be transmitted by being added to the HTTP
  1039. request URI as a query parameter as defined by [RFC3986], Section 3.
  1040. For example (line breaks are for display purposes only):
  1041. GET /example/path?oauth_consumer_key=0685bd9184jfhq22&
  1042. oauth_token=ad180jjd733klru7&oauth_signature_method=HM
  1043. AC-SHA1&oauth_signature=wOJIO9A2W5mFwDgiDvZbTSMK%2FPY%
  1044. 3D&oauth_timestamp=137131200&oauth_nonce=4572616e48616
  1045. d6d65724c61686176&oauth_version=1.0 HTTP/1.1
  1046. The request URI MAY include other request-specific query parameters,
  1047. in which case, the protocol parameters SHOULD be appended following
  1048. the request-specific parameters, properly separated by an "&"
  1049. character (ASCII code 38).
  1050. Hammer-Lahav Informational [Page 28]
  1051. RFC 5849 OAuth 1.0 April 2010
  1052. 3.6. Percent Encoding
  1053. Existing percent-encoding methods do not guarantee a consistent
  1054. construction of the signature base string. The following percent-
  1055. encoding method is not defined to replace the existing encoding
  1056. methods defined by [RFC3986] and [W3C.REC-html40-19980424]. It is
  1057. used only in the construction of the signature base string and the
  1058. "Authorization" header field.
  1059. This specification defines the following method for percent-encoding
  1060. strings:
  1061. 1. Text values are first encoded as UTF-8 octets per [RFC3629] if
  1062. they are not already. This does not include binary values that
  1063. are not intended for human consumption.
  1064. 2. The values are then escaped using the [RFC3986] percent-encoding
  1065. (%XX) mechanism as follows:
  1066. * Characters in the unreserved character set as defined by
  1067. [RFC3986], Section 2.3 (ALPHA, DIGIT, "-", ".", "_", "~") MUST
  1068. NOT be encoded.
  1069. * All other characters MUST be encoded.
  1070. * The two hexadecimal characters used to represent encoded
  1071. characters MUST be uppercase.
  1072. This method is different from the encoding scheme used by the
  1073. "application/x-www-form-urlencoded" content-type (for example, it
  1074. encodes space characters as "%20" and not using the "+" character).
  1075. It MAY be different from the percent-encoding functions provided by
  1076. web-development frameworks (e.g., encode different characters, use
  1077. lowercase hexadecimal characters).
  1078. 4. Security Considerations
  1079. As stated in [RFC2617], the greatest sources of risks are usually
  1080. found not in the core protocol itself but in policies and procedures
  1081. surrounding its use. Implementers are strongly encouraged to assess
  1082. how this protocol addresses their security requirements.
  1083. 4.1. RSA-SHA1 Signature Method
  1084. Authenticated requests made with "RSA-SHA1" signatures do not use the
  1085. token shared-secret, or any provisioned client shared-secret. This
  1086. means the request relies completely on the secrecy of the private key
  1087. used by the client to sign requests.
  1088. Hammer-Lahav Informational [Page 29]
  1089. RFC 5849 OAuth 1.0 April 2010
  1090. 4.2. Confidentiality of Requests
  1091. While this protocol provides a mechanism for verifying the integrity
  1092. of requests, it provides no guarantee of request confidentiality.
  1093. Unless further precautions are taken, eavesdroppers will have full
  1094. access to request content. Servers should carefully consider the
  1095. kinds of data likely to be sent as part of such requests, and should
  1096. employ transport-layer security mechanisms to protect sensitive
  1097. resources.
  1098. 4.3. Spoofing by Counterfeit Servers
  1099. This protocol makes no attempt to verify the authenticity of the
  1100. server. A hostile party could take advantage of this by intercepting
  1101. the client's requests and returning misleading or otherwise incorrect
  1102. responses. Service providers should consider such attacks when
  1103. developing services using this protocol, and should require
  1104. transport-layer security for any requests where the authenticity of
  1105. the server or of request responses is an issue.
  1106. 4.4. Proxying and Caching of Authenticated Content
  1107. The HTTP Authorization scheme (Section 3.5.1) is optional. However,
  1108. [RFC2616] relies on the "Authorization" and "WWW-Authenticate" header
  1109. fields to distinguish authenticated content so that it can be
  1110. protected. Proxies and caches, in particular, may fail to adequately
  1111. protect requests not using these header fields.
  1112. For example, private authenticated content may be stored in (and thus
  1113. retrievable from) publicly accessible caches. Servers not using the
  1114. HTTP "Authorization" header field should take care to use other
  1115. mechanisms, such as the "Cache-Control" header field, to ensure that
  1116. authenticated content is protected.
  1117. 4.5. Plaintext Storage of Credentials
  1118. The client shared-secret and token shared-secret function the same
  1119. way passwords do in traditional authentication systems. In order to
  1120. compute the signatures used in methods other than "RSA-SHA1", the
  1121. server must have access to these secrets in plaintext form. This is
  1122. in contrast, for example, to modern operating systems, which store
  1123. only a one-way hash of user credentials.
  1124. If an attacker were to gain access to these secrets -- or worse, to
  1125. the server's database of all such secrets -- he or she would be able
  1126. to perform any action on behalf of any resource owner. Accordingly,
  1127. it is critical that servers protect these secrets from unauthorized
  1128. access.
  1129. Hammer-Lahav Informational [Page 30]
  1130. RFC 5849 OAuth 1.0 April 2010
  1131. 4.6. Secrecy of the Client Credentials
  1132. In many cases, the client application will be under the control of
  1133. potentially untrusted parties. For example, if the client is a
  1134. desktop application with freely available source code or an
  1135. executable binary, an attacker may be able to download a copy for
  1136. analysis. In such cases, attackers will be able to recover the
  1137. client credentials.
  1138. Accordingly, servers should not use the client credentials alone to
  1139. verify the identity of the client. Where possible, other factors
  1140. such as IP address should be used as well.
  1141. 4.7. Phishing Attacks
  1142. Wide deployment of this and similar protocols may cause resource
  1143. owners to become inured to the practice of being redirected to
  1144. websites where they are asked to enter their passwords. If resource
  1145. owners are not careful to verify the authenticity of these websites
  1146. before entering their credentials, it will be possible for attackers
  1147. to exploit this practice to steal resource owners' passwords.
  1148. Servers should attempt to educate resource owners about the risks
  1149. phishing attacks pose, and should provide mechanisms that make it
  1150. easy for resource owners to confirm the authenticity of their sites.
  1151. Client developers should consider the security implications of how
  1152. they interact with a user-agent (e.g., separate window, embedded),
  1153. and the ability of the end-user to verify the authenticity of the
  1154. server website.
  1155. 4.8. Scoping of Access Requests
  1156. By itself, this protocol does not provide any method for scoping the
  1157. access rights granted to a client. However, most applications do
  1158. require greater granularity of access rights. For example, servers
  1159. may wish to make it possible to grant access to some protected
  1160. resources but not others, or to grant only limited access (such as
  1161. read-only access) to those protected resources.
  1162. When implementing this protocol, servers should consider the types of
  1163. access resource owners may wish to grant clients, and should provide
  1164. mechanisms to do so. Servers should also take care to ensure that
  1165. resource owners understand the access they are granting, as well as
  1166. any risks that may be involved.
  1167. Hammer-Lahav Informational [Page 31]
  1168. RFC 5849 OAuth 1.0 April 2010
  1169. 4.9. Entropy of Secrets
  1170. Unless a transport-layer security protocol is used, eavesdroppers
  1171. will have full access to authenticated requests and signatures, and
  1172. will thus be able to mount offline brute-force attacks to recover the
  1173. credentials used. Servers should be careful to assign shared-secrets
  1174. that are long enough, and random enough, to resist such attacks for
  1175. at least the length of time that the shared-secrets are valid.
  1176. For example, if shared-secrets are valid for two weeks, servers
  1177. should ensure that it is not possible to mount a brute force attack
  1178. that recovers the shared-secret in less than two weeks. Of course,
  1179. servers are urged to err on the side of caution, and use the longest
  1180. secrets reasonable.
  1181. It is equally important that the pseudo-random number generator
  1182. (PRNG) used to generate these secrets be of sufficiently high
  1183. quality. Many PRNG implementations generate number sequences that
  1184. may appear to be random, but that nevertheless exhibit patterns or
  1185. other weaknesses that make cryptanalysis or brute force attacks
  1186. easier. Implementers should be careful to use cryptographically
  1187. secure PRNGs to avoid these problems.
  1188. 4.10. Denial-of-Service / Resource-Exhaustion Attacks
  1189. This specification includes a number of features that may make
  1190. resource exhaustion attacks against servers possible. For example,
  1191. this protocol requires servers to track used nonces. If an attacker
  1192. is able to use many nonces quickly, the resources required to track
  1193. them may exhaust available capacity. And again, this protocol can
  1194. require servers to perform potentially expensive computations in
  1195. order to verify the signature on incoming requests. An attacker may
  1196. exploit this to perform a denial-of-service attack by sending a large
  1197. number of invalid requests to the server.
  1198. Resource Exhaustion attacks are by no means specific to this
  1199. specification. However, implementers should be careful to consider
  1200. the additional avenues of attack that this protocol exposes, and
  1201. design their implementations accordingly. For example, entropy
  1202. starvation typically results in either a complete denial of service
  1203. while the system waits for new entropy or else in weak (easily
  1204. guessable) secrets. When implementing this protocol, servers should
  1205. consider which of these presents a more serious risk for their
  1206. application and design accordingly.
  1207. Hammer-Lahav Informational [Page 32]
  1208. RFC 5849 OAuth 1.0 April 2010
  1209. 4.11. SHA-1 Cryptographic Attacks
  1210. SHA-1, the hash algorithm used in "HMAC-SHA1" and "RSA-SHA1"
  1211. signature methods, has been shown to have a number of cryptographic
  1212. weaknesses that significantly reduce its resistance to collision
  1213. attacks. While these weaknesses do not seem to affect the use of
  1214. SHA-1 with the Hash-based Message Authentication Code (HMAC) and
  1215. should not affect the "HMAC-SHA1" signature method, it may affect the
  1216. use of the "RSA-SHA1" signature method. NIST has announced that it
  1217. will phase out use of SHA-1 in digital signatures by 2010
  1218. [NIST_SHA-1Comments].
  1219. Practically speaking, these weaknesses are difficult to exploit, and
  1220. by themselves do not pose a significant risk to users of this
  1221. protocol. They may, however, make more efficient attacks possible,
  1222. and servers should take this into account when considering whether
  1223. SHA-1 provides an adequate level of security for their applications.
  1224. 4.12. Signature Base String Limitations
  1225. The signature base string has been designed to support the signature
  1226. methods defined in this specification. Those designing additional
  1227. signature methods, should evaluated the compatibility of the
  1228. signature base string with their security requirements.
  1229. Since the signature base string does not cover the entire HTTP
  1230. request, such as most request entity-body, most entity-headers, and
  1231. the order in which parameters are sent, servers should employ
  1232. additional mechanisms to protect such elements.
  1233. 4.13. Cross-Site Request Forgery (CSRF)
  1234. Cross-Site Request Forgery (CSRF) is a web-based attack whereby HTTP
  1235. requests are transmitted from a user that the website trusts or has
  1236. authenticated. CSRF attacks on authorization approvals can allow an
  1237. attacker to obtain authorization to protected resources without the
  1238. consent of the User. Servers SHOULD strongly consider best practices
  1239. in CSRF prevention at all the protocol authorization endpoints.
  1240. CSRF attacks on OAuth callback URIs hosted by clients are also
  1241. possible. Clients should prevent CSRF attacks on OAuth callback URIs
  1242. by verifying that the resource owner at the client site intended to
  1243. complete the OAuth negotiation with the server. The methods for
  1244. preventing such CSRF attacks are beyond the scope of this
  1245. specification.
  1246. Hammer-Lahav Informational [Page 33]
  1247. RFC 5849 OAuth 1.0 April 2010
  1248. 4.14. User Interface Redress
  1249. Servers should protect the authorization process against user
  1250. interface (UI) redress attacks (also known as "clickjacking"). As of
  1251. the time of this writing, no complete defenses against UI redress are
  1252. available. Servers can mitigate the risk of UI redress attacks using
  1253. the following techniques:
  1254. o JavaScript frame busting.
  1255. o JavaScript frame busting, and requiring that browsers have
  1256. JavaScript enabled on the authorization page.
  1257. o Browser-specific anti-framing techniques.
  1258. o Requiring password reentry before issuing OAuth tokens.
  1259. 4.15. Automatic Processing of Repeat Authorizations
  1260. Servers may wish to automatically process authorization requests
  1261. (Section 2.2) from clients that have been previously authorized by
  1262. the resource owner. When the resource owner is redirected to the
  1263. server to grant access, the server detects that the resource owner
  1264. has already granted access to that particular client. Instead of
  1265. prompting the resource owner for approval, the server automatically
  1266. redirects the resource owner back to the client.
  1267. If the client credentials are compromised, automatic processing
  1268. creates additional security risks. An attacker can use the stolen
  1269. client credentials to redirect the resource owner to the server with
  1270. an authorization request. The server will then grant access to the
  1271. resource owner's data without the resource owner's explicit approval,
  1272. or even awareness of an attack. If no automatic approval is
  1273. implemented, an attacker must use social engineering to convince the
  1274. resource owner to approve access.
  1275. Servers can mitigate the risks associated with automatic processing
  1276. by limiting the scope of token credentials obtained through automated
  1277. approvals. Tokens credentials obtained through explicit resource
  1278. owner consent can remain unaffected. Clients can mitigate the risks
  1279. associated with automatic processing by protecting their client
  1280. credentials.
  1281. Hammer-Lahav Informational [Page 34]
  1282. RFC 5849 OAuth 1.0 April 2010
  1283. 5. Acknowledgments
  1284. This specification is directly based on the OAuth Core 1.0 Revision A
  1285. community specification, which in turn was modeled after existing
  1286. proprietary protocols and best practices that have been independently
  1287. implemented by various companies.
  1288. The community specification was edited by Eran Hammer-Lahav and
  1289. authored by: Mark Atwood, Dirk Balfanz, Darren Bounds, Richard M.
  1290. Conlan, Blaine Cook, Leah Culver, Breno de Medeiros, Brian Eaton,
  1291. Kellan Elliott-McCrea, Larry Halff, Eran Hammer-Lahav, Ben Laurie,
  1292. Chris Messina, John Panzer, Sam Quigley, David Recordon, Eran
  1293. Sandler, Jonathan Sergent, Todd Sieling, Brian Slesinsky, and Andy
  1294. Smith.
  1295. The editor would like to thank the following individuals for their
  1296. invaluable contribution to the publication of this edition of the
  1297. protocol: Lisa Dusseault, Justin Hart, Avshalom Houri, Chris Messina,
  1298. Mark Nottingham, Tim Polk, Peter Saint-Andre, Joseph Smarr, and Paul
  1299. Walker.
  1300. Hammer-Lahav Informational [Page 35]
  1301. RFC 5849 OAuth 1.0 April 2010
  1302. Appendix A. Differences from the Community Edition
  1303. This specification includes the following changes made to the
  1304. original community document [OAuthCore1.0_RevisionA] in order to
  1305. correct mistakes and omissions identified since the document was
  1306. originally published at <http://oauth.net>.
  1307. o Changed using TLS/SSL when sending or requesting plain text
  1308. credentials from SHOULD to MUST. This change affects any use of
  1309. the "PLAINTEXT" signature method, as well as requesting temporary
  1310. credentials (Section 2.1) and obtaining token credentials
  1311. (Section 2.3).
  1312. o Adjusted nonce language to indicate it is unique per token/
  1313. timestamp/client combination.
  1314. o Removed the requirement for timestamps to be equal to or greater
  1315. than the timestamp used in the previous request.
  1316. o Changed the nonce and timestamp parameters to OPTIONAL when using
  1317. the "PLAINTEXT" signature method.
  1318. o Extended signature base string coverage that includes
  1319. "application/x-www-form-urlencoded" entity-body parameters when
  1320. the HTTP method used is other than "POST" and URI query parameters
  1321. when the HTTP method used is other than "GET".
  1322. o Incorporated corrections to the instructions in each signature
  1323. method to encode the signature value before inserting it into the
  1324. "oauth_signature" parameter, removing errors that would have
  1325. caused double-encoded values.
  1326. o Allowed omitting the "oauth_token" parameter when empty.
  1327. o Permitted sending requests for temporary credentials with an empty
  1328. "oauth_token" parameter.
  1329. o Removed the restrictions from defining additional "oauth_"
  1330. parameters.
  1331. Hammer-Lahav Informational [Page 36]
  1332. RFC 5849 OAuth 1.0 April 2010
  1333. 6. References
  1334. 6.1. Normative References
  1335. [RFC2045] Freed, N. and N. Borenstein, "Multipurpose Internet Mail
  1336. Extensions (MIME) Part One: Format of Internet Message
  1337. Bodies", RFC 2045, November 1996.
  1338. [RFC2104] Krawczyk, H., Bellare, M., and R. Canetti, "HMAC: Keyed-
  1339. Hashing for Message Authentication", RFC 2104,
  1340. February 1997.
  1341. [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
  1342. Requirement Levels", BCP 14, RFC 2119, March 1997.
  1343. [RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H.,
  1344. Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext
  1345. Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999.
  1346. [RFC2617] Franks, J., Hallam-Baker, P., Hostetler, J., Lawrence, S.,
  1347. Leach, P., Luotonen, A., and L. Stewart, "HTTP
  1348. Authentication: Basic and Digest Access Authentication",
  1349. RFC 2617, June 1999.
  1350. [RFC2818] Rescorla, E., "HTTP Over TLS", RFC 2818, May 2000.
  1351. [RFC3447] Jonsson, J. and B. Kaliski, "Public-Key Cryptography
  1352. Standards (PKCS) #1: RSA Cryptography Specifications
  1353. Version 2.1", RFC 3447, February 2003.
  1354. [RFC3629] Yergeau, F., "UTF-8, a transformation format of ISO
  1355. 10646", STD 63, RFC 3629, November 2003.
  1356. [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform
  1357. Resource Identifier (URI): Generic Syntax", STD 66,
  1358. RFC 3986, January 2005.
  1359. [W3C.REC-html40-19980424]
  1360. Hors, A., Raggett, D., and I. Jacobs, "HTML 4.0
  1361. Specification", World Wide Web Consortium
  1362. Recommendation REC-html40-19980424, April 1998,
  1363. <http://www.w3.org/TR/1998/REC-html40-19980424>.
  1364. Hammer-Lahav Informational [Page 37]
  1365. RFC 5849 OAuth 1.0 April 2010
  1366. 6.2. Informative References
  1367. [NIST_SHA-1Comments]
  1368. Burr, W., "NIST Comments on Cryptanalytic Attacks on
  1369. SHA-1",
  1370. <http://csrc.nist.gov/groups/ST/hash/statement.html>.
  1371. [OAuthCore1.0_RevisionA]
  1372. OAuth Community, "OAuth Core 1.0 Revision A",
  1373. <http://oauth.net/core/1.0a>.
  1374. Author's Address
  1375. Eran Hammer-Lahav (editor)
  1376. EMail: eran@hueniverse.com
  1377. URI: http://hueniverse.com
  1378. Hammer-Lahav Informational [Page 38]