idnits 2.17.1 draft-ietf-oauth-v2-02.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == The document seems to lack the recommended RFC 2119 boilerplate, even if it appears to use RFC 2119 keywords. (The document does seem to have the reference to RFC 2119 which the ID-Checklist requires). -- The document date (May 6, 2010) is 5103 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Unused Reference: 'NIST FIPS-180-3' is defined on line 2085, but no explicit reference was found in the text == Unused Reference: 'RFC3447' is defined on line 2111, but no explicit reference was found in the text == Unused Reference: 'RFC3629' is defined on line 2115, but no explicit reference was found in the text == Unused Reference: 'I-D.hammer-oauth' is defined on line 2133, but no explicit reference was found in the text == Unused Reference: 'I-D.hardt-oauth' is defined on line 2137, but no explicit reference was found in the text == Outdated reference: A later version (-26) exists of draft-ietf-httpbis-p1-messaging-09 -- Possible downref: Non-RFC (?) normative reference: ref. 'NIST FIPS-180-3' ** Downref: Normative reference to an Informational RFC: RFC 2104 ** Obsolete normative reference: RFC 2616 (Obsoleted by RFC 7230, RFC 7231, RFC 7232, RFC 7233, RFC 7234, RFC 7235) ** Obsolete normative reference: RFC 2617 (Obsoleted by RFC 7235, RFC 7615, RFC 7616, RFC 7617) ** Obsolete normative reference: RFC 2818 (Obsoleted by RFC 9110) ** Obsolete normative reference: RFC 3447 (Obsoleted by RFC 8017) ** Obsolete normative reference: RFC 4627 (Obsoleted by RFC 7158, RFC 7159) Summary: 6 errors (**), 0 flaws (~~), 8 warnings (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group E. Hammer-Lahav, Ed. 3 Internet-Draft Yahoo! 4 Intended status: Standards Track D. Recordon 5 Expires: November 7, 2010 Facebook 6 D. Hardt 7 May 6, 2010 9 The OAuth 2.0 Protocol 10 draft-ietf-oauth-v2-02 12 Abstract 14 This specification describes the OAuth 2.0 protocol. OAuth provides 15 a method for making authenticated HTTP requests using a token - an 16 identifier used to denote an access grant with specific scope, 17 duration, and other attributes. Tokens are issued to third-party 18 clients by an authorization server with the approval of the resource 19 owner. OAuth defines multiple flows for obtaining a token to support 20 a wide range of client types and user experience. 22 Status of this Memo 24 This Internet-Draft is submitted in full conformance with the 25 provisions of BCP 78 and BCP 79. 27 Internet-Drafts are working documents of the Internet Engineering 28 Task Force (IETF). Note that other groups may also distribute 29 working documents as Internet-Drafts. The list of current Internet- 30 Drafts is at http://datatracker.ietf.org/drafts/current/. 32 Internet-Drafts are draft documents valid for a maximum of six months 33 and may be updated, replaced, or obsoleted by other documents at any 34 time. It is inappropriate to use Internet-Drafts as reference 35 material or to cite them other than as "work in progress." 37 This Internet-Draft will expire on November 7, 2010. 39 Copyright Notice 41 Copyright (c) 2010 IETF Trust and the persons identified as the 42 document authors. All rights reserved. 44 This document is subject to BCP 78 and the IETF Trust's Legal 45 Provisions Relating to IETF Documents 46 (http://trustee.ietf.org/license-info) in effect on the date of 47 publication of this document. Please review these documents 48 carefully, as they describe your rights and restrictions with respect 49 to this document. Code Components extracted from this document must 50 include Simplified BSD License text as described in Section 4.e of 51 the Trust Legal Provisions and are provided without warranty as 52 described in the Simplified BSD License. 54 Table of Contents 56 1. Authors . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 57 2. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4 58 2.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 5 59 2.2. Overview . . . . . . . . . . . . . . . . . . . . . . . . . 6 60 2.3. Example . . . . . . . . . . . . . . . . . . . . . . . . . 8 61 2.4. Notational Conventions . . . . . . . . . . . . . . . . . . 8 62 2.5. Conformance . . . . . . . . . . . . . . . . . . . . . . . 8 63 3. Obtaining an Access Token . . . . . . . . . . . . . . . . . . 8 64 3.1. Authorization Endpoint . . . . . . . . . . . . . . . . . . 9 65 3.2. Token Endpoint . . . . . . . . . . . . . . . . . . . . . . 9 66 3.2.1. Response Format . . . . . . . . . . . . . . . . . . . 10 67 3.3. Flow Parameters . . . . . . . . . . . . . . . . . . . . . 11 68 3.4. Client Credentials . . . . . . . . . . . . . . . . . . . . 12 69 3.5. User Delegation Flows . . . . . . . . . . . . . . . . . . 12 70 3.5.1. User-Agent Flow . . . . . . . . . . . . . . . . . . . 12 71 3.5.2. Web Server Flow . . . . . . . . . . . . . . . . . . . 17 72 3.5.3. Device Flow . . . . . . . . . . . . . . . . . . . . . 23 73 4. End-user Credentials Flows . . . . . . . . . . . . . . . . . . 28 74 4.1. Username and Password Flow . . . . . . . . . . . . . . . . 29 75 4.1.1. Client Requests Access Token . . . . . . . . . . . . . 30 76 5. Autonomous Client Flows . . . . . . . . . . . . . . . . . . . 32 77 5.1. Client Credentials Flow . . . . . . . . . . . . . . . . . 32 78 5.1.1. Client Requests Access Token . . . . . . . . . . . . . 32 79 5.2. Assertion Flow . . . . . . . . . . . . . . . . . . . . . . 34 80 5.2.1. Client Requests Access Token . . . . . . . . . . . . . 35 81 6. Refreshing an Access Token . . . . . . . . . . . . . . . . . . 36 82 7. Accessing a Protected Resource . . . . . . . . . . . . . . . . 38 83 7.1. The Authorization Request Header . . . . . . . . . . . . . 39 84 7.2. Bearer Token Requests . . . . . . . . . . . . . . . . . . 40 85 7.2.1. URI Query Parameter . . . . . . . . . . . . . . . . . 41 86 7.2.2. Form-Encoded Body Parameter . . . . . . . . . . . . . 41 87 7.3. Cryptographic Tokens Requests . . . . . . . . . . . . . . 42 88 7.3.1. The 'hmac-sha256' Algorithm . . . . . . . . . . . . . 43 89 8. Identifying a Protected Resource . . . . . . . . . . . . . . . 46 90 8.1. The WWW-Authenticate Response Header . . . . . . . . . . . 46 91 8.1.1. The 'realm' Attribute . . . . . . . . . . . . . . . . 47 92 8.1.2. The 'authorization-uri' Attribute . . . . . . . . . . 47 93 8.1.3. The 'algorithms' Attribute . . . . . . . . . . . . . . 47 94 8.1.4. The 'error' Attribute . . . . . . . . . . . . . . . . 47 95 9. Security Considerations . . . . . . . . . . . . . . . . . . . 47 96 10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 47 97 11. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 47 98 Appendix A. Differences from OAuth 1.0a . . . . . . . . . . . . . 47 99 Appendix B. Document History . . . . . . . . . . . . . . . . . . 48 100 12. References . . . . . . . . . . . . . . . . . . . . . . . . . . 48 101 12.1. Normative References . . . . . . . . . . . . . . . . . . . 48 102 12.2. Informative References . . . . . . . . . . . . . . . . . . 49 103 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 50 105 1. Authors 107 This specification was authored with the participation and based on 108 the work of Allen Tom (Yahoo!), Brian Eaton (Google), Brent Goldman 109 (Facebook), Luke Shepard (Facebook), Raffi Krikorian (Twitter), and 110 Yaron Goland (Microsoft). 112 2. Introduction 114 With the increasing use of distributed web services and cloud 115 computing, third-party applications require access to server-hosted 116 resources. These resources are usually protected and require 117 authentication using the resource owner's credentials (typically a 118 username and password). In the traditional client-server 119 authentication model, a client accessing a protected resource on a 120 server presents the resource owner's credentials in order to 121 authenticate and gain access. 123 Resource owners should not be required to share their credentials 124 when granting third-party applications access to their protected 125 resources. They should also have the ability to restrict access to a 126 limited subset of the resources they control, to limit access 127 duration, or to limit access to the HTTP methods supported by these 128 resources. 130 OAuth provides a method for making authenticated HTTP requests using 131 a token - an identifier used to denote an access grant with specific 132 scope, duration, and other attributes. Tokens are issued to third- 133 party clients by an authorization server with the approval of the 134 resource owner. Instead of sharing their credentials with the 135 client, resource owners grant access by authenticating directly with 136 the authorization server which in turn issues a token to the client. 137 The client uses the token (and optional secret) to authenticate with 138 the resource server and gain access. 140 For example, a web user (resource owner) can grant a printing service 141 (client) access to her protected photos stored at a photo sharing 142 service (resource server), without sharing her username and password 143 with the printing service. Instead, she authenticates directly with 144 the photo sharing service (authorization server) which issues the 145 printing service delegation-specific credentials (token). 147 This specification defines the use of OAuth over HTTP [RFC2616] (or 148 HTTP over TLS 1.0 as defined by [RFC2818]. Other specifications may 149 extend it for use with other tranport protocols. 151 2.1. Terminology 153 resource server 154 An HTTP [RFC2616] server capable of accepting authenticated 155 resource requests using the OAuth protocol. 157 protected resource 158 An access-restricted resource which can be obtained from a 159 resource server using an OAuth-authenticated request. 161 client 162 An HTTP client capable of making authenticated requests for 163 protected resources using the OAuth protocol. 165 resource owner 166 An entity capable of granting access to a protected resource. 168 end-user 169 A human resource owner. 171 access token 172 A unique identifier used by the client to make authenticated 173 requests on behalf of the resource owner. Access tokens may 174 have a matching secret. 176 bearer token An access token without a matching secret, used to 177 obtain access to a protected resource by simply presenting the 178 access token as-is to the resource server. 180 authorization server 181 An HTTP server capable of issuing tokens after successfully 182 authenticating the resource owner and obtaining authorization. 183 The authorization server may be the same server as the resource 184 server, or a separate entity. 186 authorization endpoint 187 The authorization server's HTTP endpoint capable of 188 authenticating the resource owner and obtaining authorization. 190 token endpoint 191 The authorization server's HTTP endpoint capable of issuing 192 tokens and refreshing expired tokens. 194 client identifier 195 An unique identifier issued to the client to identify itself to 196 the authorization server. Client identifiers may have a 197 matching secret. 199 refresh token 200 A unique identifier used by the client to replace an expired 201 access token with a new access token without having to involve 202 the resource owner. A refresh token is used when the access 203 token is valid for a shorter time period than the duration of 204 the access grant approved by the resource owner. 206 2.2. Overview 208 Clients interact with a protected resource, first by requesting 209 access (which is granted in the form of an access token) from the 210 authorization server, and then by authenticating with the resource 211 server by presenting the access token. Figure 1 demonstrates the 212 flow between the client and authorization server (A, B), and the flow 213 between the client and resource server (C, D), when the client is 214 acting autonomously (the client is also the resource owner). 216 +--------+ +---------------+ 217 | |--(A)------ Credentials --------->| Authorization | 218 | | | Server | 219 | |<-(B)------ Access Token ---------| | 220 | | (w/ Optional Refresh Token) +---------------+ 221 | Client | 222 | | HTTP Request +---------------+ 223 | |--(C)--- with Access Token ------>| Resource | 224 | | | Server | 225 | |<-(D)------ HTTP Response --------| | 226 +--------+ +---------------+ 228 Figure 1 230 Access token strings can use any internal structure agreed upon 231 between the authorization server and the resource server, but their 232 structure is opaque to the client. Since the access token provides 233 the client access to the protected resource for the life of the 234 access token (or until revoked), the authorization server should 235 issue access tokens which expire within an appropriate time, usually 236 much shorter than the duration of the access grant. 238 When an access token expires, the client can request a new access 239 token from the authorization server by presenting its credentials 240 again (Figure 1), or by using the refresh token (if issued with the 241 access token) as shown in Figure 2. Once an expired access token has 242 been replaced with a new access token (A, B), the client uses the new 243 access token as before (C, D). 245 +--------+ +---------------+ 246 | |--(A)------ Refresh Token ------->| Authorization | 247 | | | Server | 248 | |<-(B)------ Access Token ---------| | 249 | | (with Optional Secret) +---------------+ 250 | Client | 251 | | HTTP Request +---------------+ 252 | |--(C)--- with Access Token ------>| Resource | 253 | | | Server | 254 | |<-(D)----- HTTP Response ---------| | 255 +--------+ +---------------+ 257 Figure 2 259 This specification defines a number of authorization flows to support 260 different client types and scenarios. These authorization flows can 261 be separated into three groups: user delegation flows, end-user 262 credentials flows, and autonomous flows. 264 Additional authorization flows may be defined by other specifications 265 to cover different scenarios and client types. 267 User delegation authorization enable clients to act on behalf of an 268 end-user after obtaining authorization from the end-user. The user 269 delegation flows defined by this specifications are: 271 o User-Agent Flow - This flow is designed for clients running inside 272 a user-agent (typically a web browser). This flow is described in 273 Section 3.5.1. 275 o Web Server Flow - This flow is optimized for clients that are part 276 of a web server application, accessible via HTTP requests. This 277 flow is described in Section 3.5.2. 279 o Device Flow - This flow is suitable for clients executing on 280 limited devices, but where the end-user has separate access to a 281 user-agent on another computer or device. This flow is described 282 in Section 3.5.3. 284 End-user credentials flow enable clients with direct access to the 285 end-user's credentials to exchange them for an access token without 286 seeking additional authorization. These flows are only suitable when 287 there is a high degree of trust between the end-user and the client. 288 The end-user credentials flow defined by this specification is: 290 o Username and Password Flow - This flow is used in cases where the 291 end-user trusts the client to handle its credentials but it is 292 still undesirable for the client to store the end-user's username 293 and password. This flow is described in Section 4.1. 295 Autonomous flows enable clients to act for their own behalf (the 296 client is also the resource owner). The autonomous authorization 297 flows defined by this specifications are: 299 o Client Credentials Flow - The client uses its credentials to 300 obtain an access token. This flow is described in Section 5.1. 302 o Assertion Flow - The client presents an assertion such as a SAML 303 [OASIS.saml-core-2.0-os] assertion to the authorization server in 304 exchange for an access token. This flow is described in 305 Section 5.2. 307 2.3. Example 309 [[ Todo ]] 311 2.4. Notational Conventions 313 The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL NOT', 314 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'MAY', and 'OPTIONAL' in this 315 document are to be interpreted as described in [RFC2119]. 317 This document uses the Augmented Backus-Naur Form (ABNF) notation of 318 [I-D.ietf-httpbis-p1-messaging]. Additionally, the realm and auth- 319 param rules are included from [RFC2617], and the URI-Reference rule 320 from [RFC3986]. 322 2.5. Conformance 324 An implementation is not compliant if it fails to satisfy one or more 325 of the MUST or REQUIRED level requirements for the flows it 326 implements. An implementation that satisfies all the MUST or 327 REQUIRED level and all the SHOULD level requirements for its flows is 328 said to be "unconditionally compliant"; one that satisfies all the 329 MUST level requirements but not all the SHOULD level requirements for 330 its flows is said to be "conditionally compliant." 332 3. Obtaining an Access Token 334 The client obtains an access token by using one of the authorization 335 flows supported by the authorization server. The authorization flows 336 all use the same authorization and token endpoints, each with a 337 different set of request parameters and values. 339 Access tokens have a scope, duration, and other access attributes 340 granted by the resource owner. These attributes MUST be enforced by 341 the resource server when receiving a protected resource request, and 342 by the authorization server when receiving a token refresh request. 344 In many cases it is desirable to issue access tokens with a shorter 345 lifetime than the duration of the authorization grant. However, it 346 may be undesirable to require the resource owner to authorize the 347 request again. Instead, the authorization server issues a refresh 348 token in addition to the access token. When the access token 349 expires, the client can request a new access token without involving 350 the resource owner as long as the authorization grant is still valid. 351 The token refresh method is described in Section 6. 353 3.1. Authorization Endpoint 355 Clients direct the resource owner to the authorization endpoint to 356 approve their access request. Before granting access, the resource 357 owner first authenticates with the authorization server. The way in 358 which the authorization server authenticates the end-user (e.g. 359 username and password login, OpenID, session cookies) and in which 360 the authorization server obtains the end-user's authorization, 361 including whether it uses a secure channel such as TLS/SSL, is beyond 362 the scope of this specification. However, the authorization server 363 MUST first verify the identity of the end-user. 365 The URI of the authorization endpoint can be found in the service 366 documentation, or can be obtained by the client by making an 367 unauthorized protected resource request (from the "WWW-Authenticate" 368 response header auth-uri (Section 8.1.2) attribute). 370 The authorization endpoint advertised by the resource server MAY 371 include a query component as defined by [RFC3986] section 3. 373 Since requests to the authorization endpoint result in user 374 authentication and the transmission of sensitive values, the 375 authorization server SHOULD require the use of a transport-layer 376 mechanism such as TLS/SSL (or a secure channel with equivalent 377 protections) when sending requests to the authorization endpoints. 379 3.2. Token Endpoint 381 After obtaining authorization from the resource owner, clients 382 request an access token from the authorization server's token 383 endpoint. 385 The URI of the token endpoint can be found in the service 386 documentation, or can be obtained by the client by making an 387 unauthorized protected resource request (from the "WWW-Authenticate" 388 response header token-uri (Section 8.1.2) attribute). 390 The token endpoint advertised by the resource server MAY include a 391 query component as defined by [RFC3986] section 3. 393 Since requests to the token endpoint result in the transmission of 394 plain text credentials in the HTTP request and response, the 395 authorization server MUST require the use of a transport-layer 396 mechanism such as TLS/SSL (or a secure channel with equivalent 397 protections) when sending requests to the token endpoints. 399 3.2.1. Response Format 401 Authorization servers respond to client requests by including a set 402 of response parameters in the entity body of the HTTP response. The 403 response uses the "application/json" media type as defined by 404 [RFC4627]. 406 The parameters are serialized into a JSON structure by adding each 407 parameter at the highest strucutre level. Parameter names and string 408 values are included as JSON strings. Numerical number are included 409 as JSON numbers. 411 The authorization server MUST include the HTTP "Cache-Control" 412 response header field with a value of "no-store" in any response 413 containing tokens, secrets, or other sensitive information. 415 3.2.1.1. Access Token Response 417 After recieving and verifying a valid and authorized access token 418 request from the client (as described in each of the flows below), 419 the authorization server constructs a JSON-formatted response which 420 includes the common parameters set as well as additional flow- 421 specific parameters. The formatted parameters are sent to the client 422 in the entity body of the HTTP response with a 200 status code (OK). 424 The token response contains the following common parameters: 426 access_token 427 REQUIRED. The access token issued by the authorization server. 429 expires_in 430 OPTIONAL. The duration in seconds of the access token 431 lifetime. 433 refresh_token 434 OPTIONAL. The refresh token used to obtain new access tokens 435 using the same end-user access grant as described in Section 6. 437 access_token_secret 438 REQUIRED if requested by the client. The corresponding access 439 token secret as requested by the client. 441 For example (line breaks are for display purposes only): 443 HTTP/1.1 200 OK 444 Content-Type: application/json 445 Cache-Control: no-store 447 {"access_token":"SlAV32hkKG","expires_in":3600, 448 "refresh_token":"8xLOxBtZp8"} 450 3.2.1.2. Error Response 452 If the token request is invalid or unauthorized, the authorization 453 server constructs a JSON-formatted response which includes the common 454 parameters set as well as additional flow-specific parameters. The 455 formatted parameters are sent to the client in the entity body of the 456 HTTP response with a 400 status code (Bad Request). 458 The response contains the following common parameter: 460 error 461 REQUIRED. The parameter value MUST be set to one of the values 462 specified by each flow. 464 For example: 466 HTTP/1.1 400 Bad Request 467 Content-Type: application/json 468 Cache-Control: no-store 470 {"error"="incorrect_client_credentials"} 472 3.3. Flow Parameters 474 The sizes of tokens and other values received from the authorization 475 server, are left undefined by this specification. Clients should 476 avoid making assumptions about value sizes. Servers should document 477 the expected size of any value they issue. 479 Unless otherwise noted, all the protocol parameter names and values 480 are case sensitive. 482 3.4. Client Credentials 484 When requesting access from the authorization server, the client 485 identifies itself using its authorization-server-issued client 486 credentials. The client credentials include a client identifier and 487 an OPTIONAL symmetric shared secret. The means through which the 488 client obtains these credentials are beyond the scope of this 489 specification, but usually involve registration with the 490 authorization server. 492 The client identifier is used by the authorization server to 493 establish the identity of the client for the purpose of presenting 494 information to the resource owner prior to granting access, as well 495 as for providing different service levels to different clients. They 496 can also be used to block unauthorized clients from requesting 497 access. 499 Due to the nature of some clients, authorization servers SHOULD NOT 500 make assumptions about the confidentiality of client credentials 501 without establishing trust with the client operator. Authorization 502 servers SHOULD NOT issue client secrets to clients incapable of 503 keeping their secrets confidential. 505 3.5. User Delegation Flows 507 User delegation flows are used to grant client access to protected 508 resources by the end-user without sharing the end-user credentials 509 (e.g. a username and password) with the client. Instead, the end- 510 user authenticates directly with the authorization server, and grants 511 client access to its protected resources. 513 3.5.1. User-Agent Flow 515 The user-agent flow is a user delegation flow suitable for client 516 applications residing in a user-agent, typically implemented in a 517 browser using a scripting language such as JavaScript. These clients 518 cannot keep client secrets confidential and the authentication of the 519 client is based on the user-agent's same-origin policy. 521 Unlike other flows in which the client makes separate authorization 522 and access token requests, the client received the access token as a 523 result of the authorization request in the form of an HTTP 524 redirection. The client requests the authorization server to 525 redirect the user-agent to another web server or local resource 526 accessible to the browser which is capable of extracting the access 527 token from the response and passing it to the client. 529 This user-agent flow does not utilize the client secret since the 530 client executables reside on the end-user's computer or device which 531 makes the client secret accessible and exploitable. Because the 532 access token is encoded into the redirection URI, it may be exposed 533 to the end-user and other applications residing on the computer or 534 device. 536 +----------+ Client Identifier +----------------+ 537 | |>---(A)-- & Redirection URI --->| | 538 | | | | 539 End <--+ - - - +----(B)-- User authenticates -->| Authorization | 540 User | | | Server | 541 | |<---(C)-- Redirect URI --------<| | 542 | Client | with Access Token | | 543 | in | (w/ Optional Refresh Token) +----------------+ 544 | Browser | in Fragment 545 | | +----------------+ 546 | |>---(D)-- Redirect URI -------->| | 547 | | without Fragment | Web Server | 548 | | | with Client | 549 | (F) |<---(E)-- Web Page with -------<| Resource | 550 | Access | Script | | 551 | Token | +----------------+ 552 +----------+ 554 Figure 3 556 The user-agent flow illustrated in Figure 3 includes the following 557 steps: 559 (A) The client sends the user-agent to the authorization server and 560 includes its client identifier and redirection URI in the 561 request. 563 (B) The authorization server authenticates the end-user (via the 564 user-agent) and establishes whether the end-user grants or 565 denies the client's access request. 567 (C) Assuming the end-user granted access, the authorization server 568 redirects the user-agent to the redirection URI provided 569 earlier. The redirection URI includes the access token in the 570 URI fragment. 572 (D) The user-agent follows the redirection instructions by making a 573 request to the web server which does not include the fragment. 574 The user-agent retains the fragment information locally. 576 (E) The web server returns a web page containing a script capable of 577 extracting the access token from the URI fragment retained by 578 the user-agent. 580 (F) The user-agent executes the script provided by the web server 581 which extracts the access token and passes it to the client. 583 3.5.1.1. Client Requests Authorization 585 In order for the end-user to grant the client access, the client 586 sends the end-user to the authorization server. The client 587 constructs the request URI by adding the following URI query 588 parameters to the user authorization endpoint URI: 590 type 591 REQUIRED. The parameter value MUST be set to "user_agent". 593 client_id 594 REQUIRED. The client identifier as described in Section 3.4. 596 redirect_uri 597 REQUIRED unless a redirection URI has been established between 598 the client and authorization server via other means. An 599 absolute URI to which the authorization server will redirect 600 the user-agent to when the end-user authorization step is 601 completed. The authorization server SHOULD require the client 602 to pre-register their redirection URI. Authorization servers 603 MAY restritc the redirection URI to not include a query 604 component as defined by [RFC3986] section 3. 606 state 607 OPTIONAL. An opaque value used by the client to maintain state 608 between the request and callback. The authorization server 609 includes this value when redirecting the user-agent back to the 610 client. 612 scope 613 OPTIONAL. The scope of the access request expressed as a list 614 of space-delimited strings. The value of the "scope" parameter 615 is defined by the authorization server. If the value contains 616 multiple space-delimited strings, their order does not matter, 617 and each string adds additional access range to the requested 618 scope. 620 immediate 621 OPTIONAL. The parameter value must be set to "true" or 622 "false". If set to "true", the authorization server MUST NOT 623 prompt the end-user to authenticate or approve access. 624 Instead, the authorization server attempts to establish the 625 end-user's identity via other means (e.g. browser cookies) and 626 checks if the end-user has previously approved an identical 627 access request by the same client and if that access grant is 628 still active. If the authorization server does not support an 629 immediate check or if it is unable to establish the end-user's 630 identity or approval status, it MUST deny the request without 631 prompting the end-user. Defaults to "false" if omitted. 633 secret_type 634 OPTIONAL. The access token secret type as described by 635 Section 7.3. If omitted, the authorization server will issue a 636 bearer token (an access token without a matching secret) as 637 described by Section 7.2. 639 The client directs the end-user to the constructed URI using an HTTP 640 redirection response, or by other means available to it via the end- 641 user's user-agent. The request MUST use the HTTP "GET" method. 643 For example, the client directs the end-user's user-agent to make the 644 following HTTPS request (line breaks are for display purposes only): 646 GET /authorize?type=user_agent&client_id=s6BhdRkqt3& 647 redirect_uri=https%3A%2F%2FEexample%2Ecom%2Frd HTTP/1.1 648 Host: server.example.com 650 If the client has previously registered a redirection URI with the 651 authorization server, the authorization server MUST verify that the 652 redirection URI received matches the registered URI associated with 653 the client identifier. 655 The authorization server authenticates the end-user and obtains an 656 authorization decision (by asking the end-user or establishing 657 approval via other means). The authorization server sends the end- 658 user's user-agent to the provided client redirection URI using an 659 HTTP redirection response. 661 3.5.1.1.1. End-user Grants Authorization 663 If the end-user authorizes the access request, the authorization 664 server issues an access token and delivers it to the client by adding 665 the following parameters, using the 666 "application/x-www-form-urlencoded" format as defined by 667 [W3C.REC-html40-19980424], to the redirection URI fragment: 669 access_token 670 REQUIRED. The access token. 672 expires_in 673 OPTIONAL. The duration in seconds of the access token 674 lifetime. 676 refresh_token 677 OPTIONAL. The refresh token. 679 state 680 REQUIRED if the "state" parameter was present in the client 681 authorization request. Set to the exact value received from 682 the client. 684 access_token_secret 685 REQUIRED if requested by the client. The corresponding access 686 token secret as requested by the client. 688 For example, the authorization server redirects the end-user's user- 689 agent by sending the following HTTP response: 691 HTTP/1.1 302 Found 692 Location: http://example.com/rd#access_token=FJQbwq9&expires_in=3600 694 3.5.1.1.2. End-user Denies Authorization 696 If the end-user denied the access request, the authorization server 697 responds to the client by adding the following parameters, using the 698 "application/x-www-form-urlencoded" format as defined by 699 [W3C.REC-html40-19980424], to the redirection URI fragment: 701 error 702 REQUIRED. The parameter value MUST be set to "user_denied". 704 state 705 REQUIRED if the "state" parameter was present in the client 706 authorization request. Set to the exact value received from 707 the client. 709 For example, the authorization server responds with the following: 711 HTTP/1.1 302 Found 712 Location: http://example.com/rd#error=user_denied 714 The authorization flow concludes unsuccessfully. To extract the 715 error message, the client follows the steps described in 716 Section 3.5.1.2. 718 3.5.1.2. Client Extracts Access Token 720 The user-agent follows the authorization server redirection response 721 by making an HTTP "GET" request to the URI received in the "Location" 722 HTTP response header. The user-agent SHALL NOT include the fragment 723 component with the request. 725 For example, the user-agent makes the following HTTP "GET" request in 726 response to the redirection directive received from the authorization 727 server: 729 GET /rd HTTP/1.1 730 Host: example.com 732 The HTTP response to the redirection request returns a web page 733 (typically an HTML page with an embedded script) capable of accessing 734 the full redirection URI including the fragment retained by the user- 735 agent, and extracting the access token (and other parameters) 736 contained in the fragment. 738 3.5.2. Web Server Flow 740 The web server flow is a user delegation flow suitable for clients 741 capable of interacting with the end-user's user-agent (typically a 742 web browser) and capable of receiving incoming requests from the 743 authorization server (capable of acting as an HTTP server). 745 +----------+ Client Identifier +---------------+ 746 | -+----(A)-- & Redirect URI ------->| | 747 | End-user | | Authorization | 748 | at |<---(B)-- User authenticates --->| Server | 749 | Browser | | | 750 | -+----(C)-- Verification Code ----<| | 751 +-|----|---+ +---------------+ 752 | | ^ v 753 (A) (C) | | 754 | | | | 755 ^ v | | 756 +---------+ | | 757 | |>---(D)-- Client Credentials, --------' | 758 | Web | Verification Code, | 759 | Client | & Redirect URI | 760 | | | 761 | |<---(E)------- Access Token -----------------' 762 +---------+ (w/ Optional Refresh Token) 764 Figure 4 766 The web server flow illustrated in Figure 4 includes the following 767 steps: 769 (A) The web client initiates the flow by redirecting the end-user's 770 user-agent to the authorization endpoint with its client 771 identifier and a redirect URI to which the authorization server 772 will send the end-user back once authorization is received (or 773 denied). 775 (B) The authorization server authenticates the end-user (via the 776 user-agent) and establishes whether the end-user grants or 777 denies the client's access request. 779 (C) Assuming the end-user granted access, the authorization server 780 redirects the user-agent back to the client to the redirection 781 URI provided earlier. The authorization includes a verification 782 code for the client to use to obtain an access token. 784 (D) The client requests an access token from the authorization 785 server by including its client credentials (identifier and 786 secret), as well as the verification code received in the 787 previous step. 789 (E) The authorization server validates the client credentials and 790 the verification code and responds back with the access token. 792 3.5.2.1. Client Requests Authorization 794 In order for the end-user to grant the client access, the client 795 sends the end-user to the authorization server. The client 796 constructs the request URI by adding the following URI query 797 parameters to the user authorization endpoint URI: 799 type 800 REQUIRED. The parameter value MUST be set to "web_server". 802 client_id 803 REQUIRED. The client identifier as described in Section 3.4. 805 redirect_uri 806 REQUIRED unless a redirection URI has been established between 807 the client and authorization server via other means. An 808 absolute URI to which the authorization server will redirect 809 the user-agent to when the end-user authorization step is 810 completed. The authorization server MAY require the client to 811 pre-register their redirection URI. Authorization servers MAY 812 restritc the redirection URI to not include a query component 813 as defined by [RFC3986] section 3. 815 state 816 OPTIONAL. An opaque value used by the client to maintain state 817 between the request and callback. The authorization server 818 includes this value when redirecting the user-agent back to the 819 client. 821 scope 822 OPTIONAL. The scope of the access request expressed as a list 823 of space-delimited strings. The value of the "scope" parameter 824 is defined by the authorization server. If the value contains 825 multiple space-delimited strings, their order does not matter, 826 and each string adds additional access range to the requested 827 scope. 829 immediate 830 OPTIONAL. The parameter value must be set to "true" or 831 "false". If set to "true", the authorization server MUST NOT 832 prompt the end-user to authenticate or approve access. 833 Instead, the authorization server attempts to establish the 834 end-user's identity via other means (e.g. browser cookies) and 835 checks if the end-user has previously approved an identical 836 access request by the same client and if that access grant is 837 still active. If the authorization server does not support an 838 immediate check or if it is unable to establish the end-user's 839 identity or approval status, it MUST deny the request without 840 prompting the end-user. Defaults to "false" if omitted. 842 The client directs the end-user to the constructed URI using an HTTP 843 redirection response, or by other means available to it via the end- 844 user's user-agent. The request MUST use the HTTP "GET" method. 846 For example, the client directs the end-user's user-agent to make the 847 following HTTPS requests (line breaks are for display purposes only): 849 GET /authorize?type=web_server&client_id=s6BhdRkqt3&redirect_uri= 850 https%3A%2F%2Fclient%2Eexample%2Ecom%2Fcb HTTP/1.1 851 Host: server.example.com 853 If the client has previously registered a redirection URI with the 854 authorization server, the authorization server MUST verify that the 855 redirection URI received matches the registered URI associated with 856 the client identifier. 858 The authorization server authenticates the end-user and obtains an 859 authorization decision (by asking the end-user or establishing 860 approval via other means). The authorization server sends the end- 861 user's user-agent to the provided client redirection URI using an 862 HTTP redirection response, or by other means available to it via the 863 end-user's user-agent. 865 3.5.2.1.1. End-user Grants Authorization 867 If the end-user authorizes the access request, the authorization 868 server generates a verification code and associates it with the 869 client identifier and redirection URI. The authorization server 870 constructs the request URI by adding the following parameters to the 871 query component of redirection URI provided by the client: 873 code 874 REQUIRED. The verification code generated by the authorization 875 server. 877 state 878 REQUIRED if the "state" parameter was present in the client 879 authorization request. Set to the exact value received from 880 the client. 882 The verification code should expire shortly after it is issued and 883 allowed for a single use. 885 For example, the authorization server redirects the end-user's user- 886 agent by sending the following HTTP response: 888 HTTP/1.1 302 Found 889 Location: https://client.example.com/cb?code=i1WsRn1uB1 891 In turn, the end-user's user-agent makes the following HTTPS "GET" 892 request: 894 GET /cb?code=i1WsRn1uB1 HTTP/1.1 895 Host: client.example.com 897 3.5.2.1.2. End-user Denies Authorization 899 If the end-user denied the access request, the authorization server 900 constructs the request URI by adding the following parameters to the 901 query component of the redirection URI provided by the client: 903 error 904 REQUIRED. The parameter value MUST be set to "user_denied". 906 state 907 REQUIRED if the "state" parameter was present in the client 908 authorization request. Set to the exact value received from 909 the client. 911 For example, the authorization server directs the client to make the 912 following HTTP request: 914 GET /cb?error=user_denied HTTP/1.1 915 Host: client.example.com 917 The authorization flow concludes unsuccessfully. 919 3.5.2.2. Client Requests Access Token 921 The client obtains an access token from the authorization server by 922 making an HTTP "POST" request to the token endpoint. The client 923 constructs a request URI by adding the following parameters to the 924 request: 926 type 927 REQUIRED. The parameter value MUST be set to "web_server". 929 client_id 930 REQUIRED. The client identifier as described in Section 3.4. 932 client_secret 933 REQUIRED if the client identifier has a matching secret. The 934 client secret as described in Section 3.4. 936 code 937 REQUIRED. The verification code received from the 938 authorization server. 940 redirect_uri 941 REQUIRED. The redirection URI used in the initial request. 943 secret_type 944 OPTIONAL. The access token secret type as described by 945 Section 7.3. If omitted, the authorization server will issue a 946 bearer token (an access token without a matching secret) as 947 described by Section 7.2. 949 For example, the client makes the following HTTPS request (line 950 breaks are for display purposes only): 952 POST /token HTTP/1.1 953 Host: server.example.com 954 Content-Type: application/x-www-form-urlencoded 956 type=web_server&client_id=s6BhdRkqt3& 957 client_secret=gX1fBat3bV&code=i1WsRn1uB1& 958 redirect_uri=https%3A%2F%2Fclient%2Eexample%2Ecom%2Fcb 960 The authorization server MUST verify that the verification code, 961 client identity, client secret, and redirection URI are all valid and 962 match its stored association. If the request is valid, the 963 authorization server issues a successful response as described in 964 Section 3.2.1.1. 966 For example (line breaks are for display purposes only): 968 HTTP/1.1 200 OK 969 Content-Type: application/json 970 Cache-Control: no-store 972 {"access_token":"SlAV32hkKG","expires_in":3600, 973 "refresh_token":"8xLOxBtZp8"} 975 If the request is invalid, the authorization server returns an error 976 response as described in Section 3.2.1.2 with one of the following 977 error codes: 979 o "redirect_uri_mismatch" 981 o "bad_verification_code" 983 o "incorrect_client_credentials" 985 For example: 987 HTTP/1.1 400 Bad Request 988 Content-Type: application/json 989 Cache-Control: no-store 991 {"error"="incorrect_client_credentials"} 993 3.5.3. Device Flow 995 The device flow is a user delegation flow suitable for clients 996 executing on devices which do not have an easy data-entry method 997 (e.g. game consoles or media hub), but where the end-user has 998 separate access to a user-agent on another computer or device (e.g. 999 home computer, a laptop, or a smartphone). The client is incapable 1000 of receiving incoming requests from the authorization server 1001 (incapable of acting as an HTTP server). 1003 Instead of interacting with the end-user's user-agent, the client 1004 instructs the end-user to use another computer or device and connect 1005 to the authorization server to approve the access request. Since the 1006 client cannot receive incoming requests, it polls the authorization 1007 server repeatedly until the end-user completes the approval process. 1009 This device flow does not utilize the client secret since the client 1010 executables reside on a local device which makes the client secret 1011 accessible and exploitable. 1013 +----------+ +----------------+ 1014 | |>---(A)-- Client Identifier --->| | 1015 | | | | 1016 | |<---(B)-- Verification Code, --<| | 1017 | | User Code, | | 1018 | | & Verification URI | | 1019 | Device | | | 1020 | Client | Client Identifier & | | 1021 | |>---(E)-- Verification Code --->| | 1022 | | ... | | 1023 | |>---(E)---> | | 1024 | | | Authorization | 1025 | |<---(F)-- Access Token --------<| Server | 1026 +----------+ (w/ Optional Refresh Token) | | 1027 v | | 1028 : | | 1029 (C) User Code & Verification URI | | 1030 : | | 1031 v | | 1032 +----------+ | | 1033 | End-user | | | 1034 | at |<---(D)-- User authenticates -->| | 1035 | Browser | | | 1036 +----------+ +----------------+ 1038 Figure 5 1040 The device flow illustrated in Figure 5 includes the following steps: 1042 (A) The client requests access from the authorization server and 1043 includes its client identifier in the request. 1045 (B) The authorization server issues a verification code, a user 1046 code, and provides the end-user authorization URI. 1048 (C) The client instructs the end-user to use its user-agent 1049 (elsewhere) and visit the provided authorization URI. The 1050 client provides the user with the user code to enter in order to 1051 grant access. 1053 (D) The authorization server authenticates the end-user (via the 1054 user-agent) and prompts the end-user to grant the client's 1055 access request by entering the user code provided by the client. 1057 (E) While the end-user authorizes (or denies) the client's request 1058 (D), the client repeatedly polls the authorization server to 1059 find out if the end-user completed the user authorization step. 1060 The client includes the verification code and its client 1061 identifier. 1063 (F) Assuming the end-user granted access, the authorization server 1064 validates the verification code provided by the client and 1065 responds back with the access token. 1067 3.5.3.1. Client Requests Authorization 1069 The client initiates the flow by requesting a set of verification 1070 codes from the authorization server by making an HTTP "GET" request 1071 to the token endpoint. The client constructs a request URI by adding 1072 the following parameters to the request: 1074 type 1075 REQUIRED. The parameter value MUST be set to "device_code". 1077 client_id 1078 REQUIRED. The client identifier as described in Section 3.4. 1080 scope 1081 OPTIONAL. The scope of the access request expressed as a list 1082 of space-delimited strings. The value of the "scope" parameter 1083 is defined by the authorization server. If the value contains 1084 multiple space-delimited strings, their order does not matter, 1085 and each string adds additional access range to the requested 1086 scope. 1088 For example, the client makes the following HTTPS request (line 1089 breaks are for display purposes only): 1091 GET /token?type=device_code&client_id=s6BhdRkqt3 1092 HTTP/1.1 1093 Host: server.example.com 1095 In response, the authorization server generates a verification code 1096 and a user code and includes them in the HTTP response body using the 1097 "application/json" format as desribed by Section 3.2.1 with a 200 1098 status code (OK). The response contains the following parameters: 1100 code 1101 REQUIRED. The verification code. 1103 user_code 1104 REQUIRED. The user code. 1106 user_uri 1107 REQUIRED. The user authorization URI on the authorization 1108 server. 1110 expires_in 1111 OPTIONAL. The duration in seconds of the verification code 1112 lifetime. 1114 interval 1115 OPTIONAL. The minimum amount of time in seconds that the 1116 client SHOULD wait between polling requests to the token 1117 endpoint. 1119 For example (line breaks are for display purposes only): 1121 HTTP/1.1 200 OK 1122 Content-Type: application/json 1123 Cache-Control: no-store 1125 {"code":"74tq5miHKB","user_code":"94248","user_uri":"http%3A%2F%2 1126 Fwww%2Eexample%2Ecom%2Fdevice","interval"=5} 1128 The client displays the user code and the user authorization URI to 1129 the end-user, and instructs the end-user to visit the URI using a 1130 user-agent and enter the user code. 1132 The end-user manually types the provided URI and authenticates with 1133 the authorization server. The authorization server prompts the end- 1134 user to authorize the client's request by entering the user code 1135 provided by the client. Once the end-user approves or denies the 1136 request, the authorization server informs the end-user to return to 1137 the device for further instructions. 1139 3.5.3.2. Client Requests Access Token 1141 Since the client is unable to receive incoming requests from the 1142 authorization server, it polls the authorization server repeatedly 1143 until the end-user grants or denies the request, or the verification 1144 code expires. 1146 The client makes the following request at an arbitrary but reasonable 1147 interval which MUST NOT exceed the minimum interval rate provided by 1148 the authorization server (if present via the "interval" parameter). 1149 Alternatively, the client MAY provide a user interface for the end- 1150 user to manually inform it when authorization was granted. 1152 The client requests an access token by making an HTTP "GET" request 1153 to the token endpoint. The client constructs a request URI by adding 1154 the following parameters to the request: 1156 type 1157 REQUIRED. The parameter value MUST be set to "device_token". 1159 client_id 1160 REQUIRED. The client identifier as described in Section 3.4. 1162 code 1163 The verification code received from the authorization server. 1165 secret_type 1166 OPTIONAL. The access token secret type as described by 1167 Section 7.3. If omitted, the authorization server will issue a 1168 bearer token (an access token without a matching secret) as 1169 described by Section 7.2. 1171 For example, the client makes the following HTTPS request (line 1172 breaks are for display purposes only): 1174 GET /token?type=device_token&client_id=s6BhdRkqt3 1175 &code=J2vC42OifV HTTP/1.1 1176 Host: server.example.com 1178 If the end-user authorized the request, the authorization server 1179 issues an access token response as described in Section 3.2.1.1. 1181 For example (line breaks are for display purposes only): 1183 HTTP/1.1 200 OK 1184 Content-Type: application/json 1185 Cache-Control: no-store 1187 {"access_token":"SlAV32hkKG","expires_in":3600, 1188 "refresh_token":"8xLOxBtZp8"} 1190 If the request is invalid, the authorization server returns an error 1191 response as described in Section 3.2.1.2 with one of the following 1192 error codes: 1194 o "authorization_declined" 1196 o "bad_verification_code" 1198 For example: 1200 HTTP/1.1 400 Bad Request 1201 Content-Type: application/json 1202 Cache-Control: no-store 1204 {"error"="authorization_declined"} 1206 If the end-user authorization is pending or expired without receiving 1207 any response from the end-user, or the client is exceeding the 1208 allowed polling interval, the authorization server returns an error 1209 response as described in Section 3.2.1.2 with one of the following 1210 error codes: 1212 o "'authorization_pending" 1214 o "slow_down" 1216 o "code_expired" 1218 For example: 1220 HTTP/1.1 400 Bad Request 1221 Content-Type: application/json 1222 Cache-Control: no-store 1224 {"error"="authorization_pending"} 1226 4. End-user Credentials Flows 1228 End-user credential flows are used to grant client access to 1229 protected resources by the end-user directly sharing the end-user's 1230 username and password with the client. Unlike user delegation flows, 1231 end-user credentials flows require a much higher degree of trust 1232 between the client and end-user. 1234 These flows are suitable in cases where the end-user already has a 1235 trust relationship with the client, such as its computer operating 1236 system or highly privileged applications. Authorization servers 1237 SHOULD take special care when enabling user credentials flows, and 1238 SHOULD only do so when other delegation flows are not viable. 1240 However, unlike the HTTP Basic authentication scheme defined in 1241 [RFC2617], the end-user's credentials are used in a single request 1242 and are exchanged for an access token and refresh token which 1243 eliminates the client need to store them for future use. 1245 4.1. Username and Password Flow 1247 The username and password flow is an end-user credentials flow 1248 suitable for clients capable of asking end users for their usernames 1249 and passwords. It is also used to migrate existing clients using 1250 direct authentication schemes such as HTTP Basic or Digest 1251 authentication to OAuth by converting the end-user credentials stored 1252 with tokens. 1254 The methods through which the client prompts end users for their 1255 usernames and passwords is beyond the scope of this specification. 1256 The client MUST discard the usernames and passwords once an access 1257 token has been obtained. 1259 End-user 1260 v 1261 : 1262 (A) 1263 : 1264 v 1265 +--------+ +---------------+ 1266 | | Client Credentials | | 1267 | |>--(B)--- & User Credentials ---->| Authorization | 1268 | Client | | Server | 1269 | |<--(C)---- Access Token ---------<| | 1270 | | (w/ Optional Refresh Token) | | 1271 +--------+ +---------------+ 1273 Figure 6 1275 The username and password flow illustrated in Figure 6 includes the 1276 following steps: 1278 (A) The end-user provides the client with its username and password. 1280 (B) The client sends an access token request to the authorization 1281 server and includes its client identifier and client secret, and 1282 the end-user's username and password. 1284 (C) The authorization server validates the end-user credentials and 1285 the client credentials and issues an access token. 1287 4.1.1. Client Requests Access Token 1289 The client requests an access token by making an HTTP "POST" request 1290 to the token endpoint. The client constructs a request URI by adding 1291 the following parameters to the request: 1293 type 1294 REQUIRED. The parameter value MUST be set to "username". 1296 client_id 1297 REQUIRED. The client identifier as described in Section 3.4. 1299 client_secret 1300 REQUIRED. The client secret as described in Section 3.4. 1301 OPTIONAL if no client secret was issued. 1303 username 1304 REQUIRED. The end-user's username. 1306 password 1307 REQUIRED. The end-user's password. 1309 scope 1310 OPTIONAL. The scope of the access request expressed as a list 1311 of space-delimited strings. The value of the "scope" parameter 1312 is defined by the authorization server. If the value contains 1313 multiple space-delimited strings, their order does not matter, 1314 and each string adds additional access range to the requested 1315 scope. 1317 secret_type 1318 OPTIONAL. The access token secret type as described by 1319 Section 7.3. If omitted, the authorization server will issue a 1320 bearer token (an access token without a matching secret) as 1321 described by Section 7.2. 1323 For example, the client makes the following HTTPS request (line 1324 breaks are for display purposes only): 1326 POST /token HTTP/1.1 1327 Host: server.example.com 1329 type=username&client_id=s6BhdRkqt3&client_secret= 1330 47HDu8s&username=johndoe&password=A3ddj3w 1332 The authorization server MUST validate the client credentials and 1333 end-user credentials and if valid issues an access token response as 1334 described in Section 3.2.1.1. 1336 For example (line breaks are for display purposes only): 1338 HTTP/1.1 200 OK 1339 Content-Type: application/json 1340 Cache-Control: no-store 1342 {"access_token":"SlAV32hkKG","expires_in":3600, 1343 "refresh_token":"8xLOxBtZp8"} 1345 If the request is invalid, the authorization server returns an error 1346 response as described in Section 3.2.1.2 with one of the following 1347 error codes: 1349 o "incorrect_client_credentials" 1351 o "unauthorized_client'" - The client is not permitted to use this 1352 flow. 1354 For example: 1356 HTTP/1.1 400 Bad Request 1357 Content-Type: application/json 1358 Cache-Control: no-store 1360 {"error"="incorrect_client_credentials"} 1362 5. Autonomous Client Flows 1364 Autonomous client flows are used to grant client access to protected 1365 resources controlled by the client (i.e. the client is the resource 1366 owner). For example, these flows are useful when a service provides 1367 both client-specific resources in addition to end-user resources. 1369 5.1. Client Credentials Flow 1371 The client credentials flow is used when the client acts autonomously 1372 without acting on behalf of a separate resource owner. The client 1373 secret is assumed to be high-entropy since it is not designed to be 1374 memorized by an end-user. 1376 +--------+ +---------------+ 1377 | | | | 1378 | |>--(A)--- Client Credentials ---->| Authorization | 1379 | Client | | Server | 1380 | |<--(B)---- Access Token ---------<| | 1381 | | (w/ Optional Refresh Token) | | 1382 +--------+ +---------------+ 1384 Figure 7 1386 The client credential flow illustrated in Figure 7 includes the 1387 following steps: 1389 (A) The client sends an access token request to the authorization 1390 server and includes its client identifier and client secret. 1392 (B) The authorization server validates the client credentials and 1393 issues an access token. 1395 5.1.1. Client Requests Access Token 1397 The client requests an access token by making an HTTP "POST" request 1398 to the token endpoint. The client constructs a request URI by adding 1399 the following parameters to the request: 1401 type 1402 REQUIRED. The parameter value MUST be set to 1403 "client_credentials". 1405 client_id 1406 REQUIRED. The client identifier as described in Section 3.4. 1408 client_secret 1409 REQUIRED. The client secret as described in Section 3.4. 1411 scope 1412 OPTIONAL. The scope of the access request expressed as a list 1413 of space-delimited strings. The value of the "scope" parameter 1414 is defined by the authorization server. If the value contains 1415 multiple space-delimited strings, their order does not matter, 1416 and each string adds additional access range to the requested 1417 scope. 1419 secret_type 1420 OPTIONAL. The access token secret type as described by 1421 Section 7.3. If omitted, the authorization server will issue a 1422 bearer token (an access token without a matching secret) as 1423 described by Section 7.2. 1425 For example, the client makes the following HTTPS request (line 1426 breaks are for display purposes only): 1428 POST /token HTTP/1.1 1429 Host: server.example.com 1431 type=client_credentials&client_id=s6BhdRkqt3&client_secret=47HDu8s 1433 The authorization server MUST validate the client credentials and if 1434 valid issues an access token response as described in 1435 Section 3.2.1.1. 1437 For example (line breaks are for display purposes only): 1439 HTTP/1.1 200 OK 1440 Content-Type: application/json 1441 Cache-Control: no-store 1443 {"access_token":"SlAV32hkKG","expires_in":3600, 1444 "refresh_token":"8xLOxBtZp8"} 1446 If the request is invalid, the authorization server returns an error 1447 response as described in Section 3.2.1.2 with one of the following 1448 error codes: 1450 o "incorrect_client_credentials" 1452 For example: 1454 HTTP/1.1 400 Bad Request 1455 Content-Type: application/json 1456 Cache-Control: no-store 1458 {"error"="incorrect_client_credentials"} 1460 5.2. Assertion Flow 1462 The assertion flow is used when a client wishes to exchange an 1463 existing security token or assertion for an access token. This flow 1464 is suitable when the client is acting autonomously or on behalf of 1465 the end-user (based on the content of the assertion used). 1467 The assertion flow requires the client to obtain a assertion (such as 1468 a SAML [OASIS.saml-core-2.0-os] assertion) from an assertion issuer 1469 or to self-issue an assertion prior to initiating the flow. The 1470 assertion format, the process by which the assertion is obtained, and 1471 the method of validating the assertion are defined by the assertion 1472 issuer and the authorization server, and are beyond the scope of this 1473 specification. 1475 +--------+ +---------------+ 1476 | | | | 1477 | |>--(A)------ Assertion ---------->| Authorization | 1478 | Client | | Server | 1479 | |<--(B)---- Access Token ---------<| | 1480 | | | | 1481 +--------+ +---------------+ 1483 Figure 8 1485 The assertion flow illustrated in Figure 8 includes the following 1486 steps: 1488 (A) The client sends an access token request to the authorization 1489 server and includes an assertion. 1491 (B) The authorization server validates the assertion and issues an 1492 access token. 1494 5.2.1. Client Requests Access Token 1496 The client requests an access token by making an HTTP "POST" request 1497 to the token endpoint. The client constructs a request URI by adding 1498 the following parameters to the request: 1500 type 1501 REQUIRED. The parameter value MUST be set to "assertion". 1503 format 1504 REQUIRED. The format of the assertion as defined by the 1505 authorization server. The value MUST be an absolute URI. 1507 assertion 1508 REQUIRED. The assertion. 1510 scope 1511 OPTIONAL. The scope of the access request expressed as a list 1512 of space-delimited strings. The value of the "scope" parameter 1513 is defined by the authorization server. If the value contains 1514 multiple space-delimited strings, their order does not matter, 1515 and each string adds additional access range to the requested 1516 scope. 1518 secret_type 1519 OPTIONAL. The access token secret type as described by 1520 Section 7.3. If omitted, the authorization server will issue a 1521 bearer token (an access token without a matching secret) as 1522 described by Section 7.2. 1524 For example, the client makes the following HTTPS request (line 1525 breaks are for display purposes only): 1527 POST /token HTTP/1.1 1528 Host: server.example.com 1530 type=assertion&format=_______&assertion=_______ 1532 The authorization server MUST validate the assertion and if valid 1533 issues an access token response as described in Section 3.2.1.1. The 1534 authorization server SHOULD NOT issue a refresh token. 1536 For example (line breaks are for display purposes only): 1538 HTTP/1.1 200 OK 1539 Content-Type: application/json 1540 Cache-Control: no-store 1542 {"access_token":"SlAV32hkKG"} 1544 If the request is invalid, the authorization server returns an error 1545 response as described in Section 3.2.1.2 with one of the following 1546 error codes: 1548 o "invalid_assertion" 1550 o "unknown_format" 1552 For example: 1554 HTTP/1.1 400 Bad Request 1555 Content-Type: application/json 1556 Cache-Control: no-store 1558 {"error"="invalid_assertion"} 1560 Authorization servers SHOULD issue access tokens with a limited 1561 lifetime and require clients to refresh them by requesting a new 1562 access token using the same assertion if it is still valid. 1563 Otherwise the client MUST obtain a new valid assertion. 1565 6. Refreshing an Access Token 1567 Token refresh is used when the lifetime of an access token is shorter 1568 than the lifetime of the authorization grant. It allows clients to 1569 obtain a new access token without having to go through the 1570 authorization flow again or involve the resource owner. It is also 1571 used to obtain a new token with different security properties (e.g. 1572 bearer token, token with shared symmetric secret). 1574 +--------+ Client Credentials, +---------------+ 1575 | | Refresh Token, | | 1576 | |>--(A)----- & Secret Type ------->| Authorization | 1577 | Client | | Server | 1578 | |<--(B)----- Access Token --------<| | 1579 | | & Optional Secret | | 1580 +--------+ +---------------+ 1582 Figure 9 1584 To refresh a token, the client constructs an HTTP "POST" request to 1585 the token endpoint and includes the following parameters in the HTTP 1586 request body using the "application/x-www-form-urlencoded" content 1587 type as defined by [W3C.REC-html40-19980424]: 1589 type 1590 REQUIRED. The parameter value MUST be set to "refresh". 1592 client_id 1593 REQUIRED. The client identifier as described in Section 3.4. 1595 client_secret 1596 REQUIRED if the client was issued a secret. The client secret. 1598 refresh_token 1599 REQUIRED. The refresh token associated with the access token 1600 to be refreshed. 1602 secret_type 1603 OPTIONAL. The access token secret type as described by 1604 Section 7.3. If omitted, the authorization server will issue a 1605 bearer token (an access token without a matching secret) as 1606 described by Section 7.2. 1608 For example, the client makes the following HTTPS request (line break 1609 are for display purposes only): 1611 POST /token HTTP/1.1 1612 Host: server.example.com 1613 Content-Type: application/x-www-form-urlencoded 1615 type=refresh_token&client_id=s6BhdRkqt3&client_secret=8eSEIpnqmM 1616 &refresh_token=n4E9O119d&secret_type=hmac-sha256 1618 verify the client credential, the validity of the refresh token, and 1619 that the resource owner's authorization is still valid. If the 1620 request is valid, the authorization server issues an access token 1621 response as described in Section 3.2.1.1. The authorization server 1622 MAY issue a new token. 1624 For example (line breaks are for display purposes only): 1626 HTTP/1.1 200 OK 1627 Content-Type: application/json 1628 Cache-Control: no-store 1630 {"access_token":"SlAV32hkKG","expires_in":3600} 1632 If the request is invalid, the authorization server returns an error 1633 response as described in Section 3.2.1.2 with one of the following 1634 error codes: 1636 o "incorrect_client_credentials" 1638 o "authorization_expired" 1640 o "unsupported_secret_type" 1642 For example: 1644 HTTP/1.1 400 Bad Request 1645 Content-Type: application/json 1646 Cache-Control: no-store 1648 {"error"="incorrect_client_credentials"} 1650 7. Accessing a Protected Resource 1652 Clients access protected resources by presenting an access token to 1653 the resource server. The methods used by the resource server to 1654 validate the access token are beyond the scope of this specification, 1655 but generally involve an interaction or coordination between the 1656 resource server and authorization server. 1658 The method in which a client uses an access token depends on the 1659 security properties of the access tokens. By default, access tokens 1660 are issued without a matching secret. Clients MAY request an access 1661 token with a matching secret by specifying the desired secret type 1662 using the "secret_type" token request parameter. 1664 When an access token does not include a matching secret, the access 1665 token acts as a bearer token, where the token string is a shared 1666 symmetric secret. This requires treating the access token with the 1667 same care as other secrets (e.g. user passwords). Access tokens 1668 SHOULD NOT be sent in the clear over an insecure channel. 1670 However, when it is necessary to transmit bearer tokens in the clear 1671 without a secure channel, authorization servers SHOULD issue access 1672 tokens with limited scope and lifetime to reduce the potential risk 1673 from a compromised access token. Clients SHOULD request and utilize 1674 an access token with a matching secret when making protected resource 1675 requests over an insecure channel (e.g. an HTTP request without using 1676 TLS/SSL). 1678 When an access token includes a matching secret, the secret is not 1679 included directly in the request but is used instead to generate a 1680 cryptographic signature of the request. The signature can only be 1681 generated and verified by entities with access to the secret. 1683 Clients SHOULD NOT make authenticated requests with an access token 1684 to unfamiliar resource servers, especially when using bearer tokens, 1685 regardless of the presence of a secure channel. 1687 7.1. The Authorization Request Header 1689 The "Authorization" request header field is used by clients to make 1690 both bearer token and cryptographic token requests. When making 1691 bearer token requests, the client uses the "token" attribute to 1692 include the access token in the request without any of the other 1693 attributes. Additional methods for making bearer token requests are 1694 described in Section 7.2. 1696 For example: 1698 GET /resource HTTP/1.1 1699 Host: server.example.com 1700 Authorization: Token token="vF9dft4qmT" 1702 When making a cryptographic token request (using an access token with 1703 a matching secret) the client uses the "token" attribute to include 1704 the access token in the request, and uses the "nonce", "timestamp", 1705 "algorithm", and "signature" attributes to apply the matching secret. 1707 For example: 1709 GET /resource HTTP/1.1 1710 Host: server.example.com 1711 Authorization: Token token="vF9dft4qmT", 1712 nonce="s8djwd", 1713 timestamp="137131200", 1714 algorithm="hmac-sha256", 1715 signature="wOJIO9A2W5mFwDgiDvZbTSMK/PY=" 1717 The "Authorization" header field uses the framework defined by 1718 [RFC2617] as follows: 1720 credentials = "Token" RWS token-response 1722 token-response = token-id 1723 [ CS nonce ] 1724 [ CS timestamp ] 1725 [ CS algorithm ] 1726 [ CS signature ] 1728 token-id = "token" "=" <"> token <"> 1729 timestamp = "timestamp" "=" <"> 1*DIGIT <"> 1730 nonce = "nonce" "=" <"> token <"> 1732 algorithm = "algorithm" "=" algorithm-name 1733 algorithm-name = "hmac-sha256" / 1734 token 1736 signature = "signature" "=" <"> token <"> 1738 7.2. Bearer Token Requests 1740 Clients make bearer token requests by including the access token 1741 using the HTTP "Authorization" request header with the "Token" 1742 authentication scheme as described in Section 7.1. The access token 1743 is included using the "token" parameter. 1745 For example, the client makes the following HTTPS request: 1747 GET /resource HTTP/1.1 1748 Host: server.example.com 1749 Authorization: Token token="vF9dft4qmT" 1751 The resource server MUST validate the access token and ensure it has 1752 not expired and that its scope covers the requested resource. If the 1753 token expired or is invalid, the resource server MUST reply with an 1754 HTTP 401 status code (Unauthorized) and include the HTTP 1755 "WWW-Authenticate" response header as described in Section 8.1. 1757 For example: 1759 HTTP/1.1 401 Unauthorized 1760 WWW-Authenticate: Token realm='Service', error='token_expired' 1762 Alternatively, the client MAY include the access token using the HTTP 1763 request URI in the query component as described in Section 7.2.1, or 1764 in the HTTP body when using the "application/x-www-form-urlencoded" 1765 content type as described in Section 7.2.2. Clients SHOULD only use 1766 the request URI or body when the "Authorization" request header is 1767 not available, and MUST NOT use more than one method in each request. 1769 7.2.1. URI Query Parameter 1771 When including the access token in the HTTP request URI, the client 1772 adds the access token to the request URI query component as defined 1773 by [RFC3986] using the "oauth_token" parameter. 1775 For example, the client makes the following HTTPS request: 1777 GET /resource?oauth_token=vF9dft4qmT HTTP/1.1 1778 Host: server.example.com 1780 The HTTP request URI query can include other request-specific 1781 parameters, in which case, the "oauth_token" parameters SHOULD be 1782 appended following the request-specific parameters, properly 1783 separated by an "&" character (ASCII code 38). 1785 The resource server MUST validate the access token and ensure it has 1786 not expired and its scope includes the requested resource. If the 1787 resource expired or is not valid, the resource server MUST reply with 1788 an HTTP 401 status code (Unauthorized) and include the HTTP 1789 "WWW-Authenticate" response header as described in Section 8.1. 1791 7.2.2. Form-Encoded Body Parameter 1793 When including the access token in the HTTP request entity-body, the 1794 client adds the access token to the request body using the 1795 "oauth_token" parameter. The client can use this method only if the 1796 following REQUIRED conditions are met: 1798 o The entity-body is single-part. 1800 o The entity-body follows the encoding requirements of the 1801 "application/x-www-form-urlencoded" content-type as defined by 1802 [W3C.REC-html40-19980424]. 1804 o The HTTP request entity-header includes the "Content-Type" header 1805 field set to "application/x-www-form-urlencoded". 1807 o The HTTP request method is "POST", "PUT", or "DELETE". 1809 The entity-body can include other request-specific parameters, in 1810 which case, the "oauth_token" parameters SHOULD be appended following 1811 the request-specific parameters, properly separated by an "&" 1812 character (ASCII code 38). 1814 For example, the client makes the following HTTPS request: 1816 POST /resource HTTP/1.1 1817 Host: server.example.com 1818 Content-Type: application/x-www-form-urlencoded 1820 oauth_token=vF9dft4qmT 1822 The resource server MUST validate the access token and ensure it has 1823 not expired and its scope includes the requested resource. If the 1824 resource expired or is not valid, the resource server MUST reply with 1825 an HTTP 401 status code (Unauthorized) and include the HTTP 1826 "WWW-Authenticate" response header as described in Section 8.1. 1828 7.3. Cryptographic Tokens Requests 1830 Clients make authenticated protected resource requests using an 1831 access token with a matching secret by calculating a set of values 1832 and including them in the request using the "Authorization" header 1833 field. The way clients calculate these values depends on the access 1834 token secret type as issued by the authorization server. 1836 This specification defines the "hmac-sha256" algorithm, and 1837 establishes a registry for providing additional algorithms. Clients 1838 obtain an access token with a matching "hmac-sha256" secret by using 1839 the "token_type" parameter when requesting an access token. 1841 7.3.1. The 'hmac-sha256' Algorithm 1843 The "hmac-sha256" algorithm uses the HMAC method as defined in 1844 [RFC2104] together with the SHA-256 hash function defined in [NIST 1845 FIPS-180-3] to apply the access token secret to the request and 1846 generate a signature value that is included in the request instead of 1847 transmitting the secret in the clear. 1849 To use the "hmac-sha256" algorithm, clients: 1851 1. Calculate the request timestamp and generate a request nonce as 1852 described in Section 7.3.1.1. 1854 2. Construct the normalized request string as described in 1855 Section 7.3.1.2. 1857 3. Calculate the request signature as described in Section 7.3.1.3. 1859 4. Include the timestamp, nonce, algorithm name, and calculated 1860 signature in the request using the "Authorization" header field. 1862 For example: 1864 GET /resource HTTP/1.1 1865 Host: server.example.com 1866 Authorization: Token token="vF9dft4qmT", 1867 nonce="s8djwd", 1868 timestamp="137131200", 1869 algorithm="hmac-sha256", 1870 signature="wOJIO9A2W5mFwDgiDvZbTSMK/PY=" 1872 The resource server MUST validate the access token and ensure it has 1873 not expired and that its scope covers the requested resource. The 1874 resource server MUST also recalculate the request signature using the 1875 attributes provided by the client and compare it to the signature 1876 provided. If the token expired or is invalid, or if the signature is 1877 incorrect, the resource server MUST reply with an HTTP 401 status 1878 code (Unauthorized) and include the HTTP "WWW-Authenticate" response 1879 header as described in Section 8.1. 1881 For example: 1883 HTTP/1.1 401 Unauthorized 1884 Date: Tue, 15 Nov 2010 08:12:31 GMT 1885 WWW-Authenticate: Token realm='Service', 1886 algorithms='hmac-sha256', 1887 error='invalid_signature' 1889 [[ Errors list ]] 1891 7.3.1.1. Nonce and Timestamp 1893 A timestamp in combination with unique nonce values is used to 1894 protect against replay attacks when transmitted over an insecure 1895 channel. 1897 The nonce is a random string, uniquely generated by the client to 1898 allow the resource server to verify that a request has never been 1899 made before and helps prevent replay attacks when requests are made 1900 over a non-secure channel. The nonce value MUST be unique across all 1901 requests with the same timestamp and token combinations. 1903 The timestamp value is the current time expressed in the number of 1904 seconds since January 1, 1970 00:00:00 GMT, and MUST be a positive 1905 integer. 1907 To avoid the need to retain an infinite number of nonce values for 1908 future checks, resource servers MAY choose to restrict the time 1909 period after which a request with an old timestamp is rejected. When 1910 resource servers apply such a restriction, clients SHOULD synchronize 1911 their clocks by using the resource server's time as indicated by the 1912 HTTP "Date" response header field as defined in [RFC2616]. 1914 7.3.1.2. Normalized String Construction 1916 The normalized request string is a consistent, reproducible 1917 concatenation of several of the HTTP request elements into a single 1918 string. The string is used as an input to the selected cryptographic 1919 method and includes the HTTP request method (e.g. "GET", "POST", 1920 etc.), the authority as declared by the HTTP "Host" request header, 1921 and the request resource URI. 1923 The normalized request string does not cover the entire HTTP request. 1924 Most notably, it does not include the entity-body or most HTTP 1925 entity-headers. It is important to note that the resource server 1926 cannot verify the authenticity of the excluded request elements 1927 without using additional protections such as TLS/SSL. 1929 The normalized request string is constructed by concatenating 1930 together, in order, the following HTTP request elements, separated by 1931 the "," character (ASCII code 44): 1933 1. The request timestamp as described in Section 7.3.1.1. 1935 2. The request nonce as described in Section 7.3.1.1. 1937 3. The cryptographic algorithm used. 1939 4. The HTTP request method in uppercase. For example: "HEAD", 1940 "GET", "POST", etc. 1942 5. The hostname, colon-separated (ASCII code 58) from the TCP port 1943 used to make the request as included in the HTTP request "Host" 1944 header field. The port MUST be included even if it is not 1945 included in the "Host" header field (i.e. the default port for 1946 the scheme). 1948 6. The request resource URI. 1950 For example, the normalized request string for the "GET" request URI 1951 "http://example.com/resource", request timestamp "137131200", request 1952 nonce "s8djwd", and "hmac-sha256" algorithm (line breaks are for 1953 display purposes only): 1955 137131200,s8djwd,hmac-sha256,GET,example.com:80, 1956 http://example.com/resource 1958 7.3.1.3. Signature Calculation 1960 Clients calculate the request signature using the HMAC-SHA256 1961 function: 1963 digest = HMAC-SHA256 (key, text) 1965 by setting the function variables are follows: 1967 text 1968 is set to the value of the normalize request string as 1969 described in Section 7.3.1.2. 1971 key 1972 is set to the access token secret. 1974 The request signature is the calculated value of the "digest" 1975 variable after the result octet string is base64-encoded per 1976 [RFC2045] section 6.8. 1978 8. Identifying a Protected Resource 1980 Clients access protected resources after locating the appropriate 1981 authorization and token endpoints and obtaining an access token. In 1982 many cases, interacting with a protected resource requires prior 1983 knowledge of the protected resource properties and methods, as well 1984 as its authentication requirements (i.e. establishing client 1985 identity, locating the authorization and token endpoints). 1987 However, there are cases in which clients are unfamiliar with the 1988 protected resource, including whether the resource requires 1989 authentication. When clients attempt to access an unfamiliar 1990 protected resource without an access token, the resource server 1991 denies the request and informs the client of the required credentials 1992 using an HTTP authentication challenge. 1994 In addition, when receiving an invalid authenticated request, the 1995 resource server issues an authentication challenge including the 1996 error type and message. 1998 8.1. The WWW-Authenticate Response Header 2000 A resource server receiving a request for a protected resource 2001 without a valid access token MUST respond with a 401 HTTP status code 2002 (Unauthorized), and includes at least one "Token" "WWW-Authenticate" 2003 response header field challenge. 2005 The "WWW-Authenticate" header field uses the framework defined by 2006 [RFC2617] as follows: 2008 challenge = "Token" RWS token-challenge 2010 token-challenge = realm 2011 [ CS authz-uri ] 2012 [ CS token-uri ] 2013 [ CS algorithms ] 2014 [ CS error ] 2016 authz-uri = "auth-uri" "=" URI-Reference 2017 token-uri = "token-uri" "=" URI-Reference 2018 algorithms = "algorithms" "=" <"> 1#algorithm-name <"> 2019 error = "error" "=" <"> token <"> 2021 CS = OWS "," OWS 2023 8.1.1. The 'realm' Attribute 2025 The "realm" attribute is used to provide the protected resources 2026 partition as defined by [RFC2617]. 2028 8.1.2. The 'authorization-uri' Attribute 2030 8.1.3. The 'algorithms' Attribute 2032 8.1.4. The 'error' Attribute 2034 9. Security Considerations 2036 [[ Todo ]] 2038 10. IANA Considerations 2040 [[ Not Yet ]] 2042 11. Acknowledgements 2044 [[ Add OAuth 1.0a authors + WG contributors ]] 2046 Appendix A. Differences from OAuth 1.0a 2048 [[ Todo ]] 2050 Appendix B. Document History 2052 [[ to be removed by RFC editor before publication as an RFC ]] 2054 -02 2056 o Removed restriction on "redirect_uri" including a query. 2058 o Added "scope" parameter. 2060 o Initial proposal for a JSON-based token response format. 2062 -01 2064 o Editorial changes based on feedback from Brian Eaton, Bill Keenan, 2065 and Chuck Mortimore. 2067 o Changed devide flow "type" parameter values and switch to use only 2068 the token endpoint. 2070 -00 2072 o Initial draft based on a combination of WRAP and OAuth 1.0a. 2074 12. References 2076 12.1. Normative References 2078 [I-D.ietf-httpbis-p1-messaging] 2079 Fielding, R., Gettys, J., Mogul, J., Nielsen, H., 2080 Masinter, L., Leach, P., Berners-Lee, T., and J. Reschke, 2081 "HTTP/1.1, part 1: URIs, Connections, and Message 2082 Parsing", draft-ietf-httpbis-p1-messaging-09 (work in 2083 progress), March 2010. 2085 [NIST FIPS-180-3] 2086 National Institute of Standards and Technology, "Secure 2087 Hash Standard (SHS). FIPS PUB 180-3, October 2008". 2089 [RFC2045] Freed, N. and N. Borenstein, "Multipurpose Internet Mail 2090 Extensions (MIME) Part One: Format of Internet Message 2091 Bodies", RFC 2045, November 1996. 2093 [RFC2104] Krawczyk, H., Bellare, M., and R. Canetti, "HMAC: Keyed- 2094 Hashing for Message Authentication", RFC 2104, 2095 February 1997. 2097 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 2098 Requirement Levels", BCP 14, RFC 2119, March 1997. 2100 [RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., 2101 Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext 2102 Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999. 2104 [RFC2617] Franks, J., Hallam-Baker, P., Hostetler, J., Lawrence, S., 2105 Leach, P., Luotonen, A., and L. Stewart, "HTTP 2106 Authentication: Basic and Digest Access Authentication", 2107 RFC 2617, June 1999. 2109 [RFC2818] Rescorla, E., "HTTP Over TLS", RFC 2818, May 2000. 2111 [RFC3447] Jonsson, J. and B. Kaliski, "Public-Key Cryptography 2112 Standards (PKCS) #1: RSA Cryptography Specifications 2113 Version 2.1", RFC 3447, February 2003. 2115 [RFC3629] Yergeau, F., "UTF-8, a transformation format of ISO 2116 10646", STD 63, RFC 3629, November 2003. 2118 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 2119 Resource Identifier (URI): Generic Syntax", STD 66, 2120 RFC 3986, January 2005. 2122 [RFC4627] Crockford, D., "The application/json Media Type for 2123 JavaScript Object Notation (JSON)", RFC 4627, July 2006. 2125 [W3C.REC-html40-19980424] 2126 Hors, A., Raggett, D., and I. Jacobs, "HTML 4.0 2127 Specification", World Wide Web Consortium 2128 Recommendation REC-html40-19980424, April 1998, 2129 . 2131 12.2. Informative References 2133 [I-D.hammer-oauth] 2134 Hammer-Lahav, E., "The OAuth 1.0 Protocol", 2135 draft-hammer-oauth-10 (work in progress), February 2010. 2137 [I-D.hardt-oauth] 2138 Hardt, D., Tom, A., Eaton, B., and Y. Goland, "OAuth Web 2139 Resource Authorization Profiles", draft-hardt-oauth-01 2140 (work in progress), January 2010. 2142 [OASIS.saml-core-2.0-os] 2143 Cantor, S., Kemp, J., Philpott, R., and E. Maler, 2144 "Assertions and Protocol for the OASIS Security Assertion 2145 Markup Language (SAML) V2.0", OASIS Standard saml-core- 2146 2.0-os, March 2005. 2148 Authors' Addresses 2150 Eran Hammer-Lahav (editor) 2151 Yahoo! 2153 Email: eran@hueniverse.com 2154 URI: http://hueniverse.com 2156 David Recordon 2157 Facebook 2159 Email: davidrecordon@facebook.com 2160 URI: http://www.davidrecordon.com/ 2162 Dick Hardt 2164 Email: dick.hardt@gmail.com 2165 URI: http://dickhardt.org/