idnits 2.17.1 draft-ietf-oauth-v2-03.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 9, 2010) is 5100 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 2075, but no explicit reference was found in the text == Unused Reference: 'RFC3447' is defined on line 2101, but no explicit reference was found in the text == Unused Reference: 'RFC3629' is defined on line 2105, but no explicit reference was found in the text == Unused Reference: 'I-D.hammer-oauth' is defined on line 2123, but no explicit reference was found in the text == Unused Reference: 'I-D.hardt-oauth' is defined on line 2127, 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 10, 2010 Facebook 6 D. Hardt 7 May 9, 2010 9 The OAuth 2.0 Protocol 10 draft-ietf-oauth-v2-03 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 10, 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-Agent Flow . . . . . . . . . . . . . . . . . . . . . 12 70 3.5.1. Client Requests Authorization . . . . . . . . . . . . 14 71 3.5.2. Client Extracts Access Token . . . . . . . . . . . . . 17 72 3.6. Web Server Flow . . . . . . . . . . . . . . . . . . . . . 17 73 3.6.1. Client Requests Authorization . . . . . . . . . . . . 19 74 3.6.2. Client Requests Access Token . . . . . . . . . . . . . 21 75 3.7. Device Flow . . . . . . . . . . . . . . . . . . . . . . . 23 76 3.7.1. Client Requests Authorization . . . . . . . . . . . . 25 77 3.7.2. Client Requests Access Token . . . . . . . . . . . . . 26 78 4. Username and Password Flow . . . . . . . . . . . . . . . . . . 28 79 4.1. Client Requests Access Token . . . . . . . . . . . . . . . 30 80 5. Client Credentials Flow . . . . . . . . . . . . . . . . . . . 31 81 5.1. Client Requests Access Token . . . . . . . . . . . . . . . 32 82 6. Assertion Flow . . . . . . . . . . . . . . . . . . . . . . . . 33 83 6.1. Client Requests Access Token . . . . . . . . . . . . . . . 34 84 7. Refreshing an Access Token . . . . . . . . . . . . . . . . . . 36 85 8. Accessing a Protected Resource . . . . . . . . . . . . . . . . 38 86 8.1. The Authorization Request Header . . . . . . . . . . . . . 39 87 8.2. Bearer Token Requests . . . . . . . . . . . . . . . . . . 40 88 8.2.1. URI Query Parameter . . . . . . . . . . . . . . . . . 41 89 8.2.2. Form-Encoded Body Parameter . . . . . . . . . . . . . 41 90 8.3. Cryptographic Tokens Requests . . . . . . . . . . . . . . 42 91 8.3.1. The 'hmac-sha256' Algorithm . . . . . . . . . . . . . 42 92 9. Identifying a Protected Resource . . . . . . . . . . . . . . . 45 93 9.1. The WWW-Authenticate Response Header . . . . . . . . . . . 46 94 9.1.1. The 'realm' Attribute . . . . . . . . . . . . . . . . 46 95 9.1.2. The 'authorization-uri' Attribute . . . . . . . . . . 46 96 9.1.3. The 'algorithms' Attribute . . . . . . . . . . . . . . 46 97 9.1.4. The 'error' Attribute . . . . . . . . . . . . . . . . 47 98 10. Security Considerations . . . . . . . . . . . . . . . . . . . 47 99 11. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 47 100 12. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 47 101 Appendix A. Differences from OAuth 1.0a . . . . . . . . . . . . . 47 102 Appendix B. Document History . . . . . . . . . . . . . . . . . . 47 103 13. References . . . . . . . . . . . . . . . . . . . . . . . . . . 48 104 13.1. Normative References . . . . . . . . . . . . . . . . . . . 48 105 13.2. Informative References . . . . . . . . . . . . . . . . . . 49 106 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 49 108 1. Authors 110 This specification was authored with the participation and based on 111 the work of Allen Tom (Yahoo!), Brian Eaton (Google), Brent Goldman 112 (Facebook), Luke Shepard (Facebook), Raffi Krikorian (Twitter), and 113 Yaron Goland (Microsoft). 115 2. Introduction 117 With the increasing use of distributed web services and cloud 118 computing, third-party applications require access to server-hosted 119 resources. These resources are usually protected and require 120 authentication using the resource owner's credentials (typically a 121 username and password). In the traditional client-server 122 authentication model, a client accessing a protected resource on a 123 server presents the resource owner's credentials in order to 124 authenticate and gain access. 126 Resource owners should not be required to share their credentials 127 when granting third-party applications access to their protected 128 resources. They should also have the ability to restrict access to a 129 limited subset of the resources they control, to limit access 130 duration, or to limit access to the HTTP methods supported by these 131 resources. 133 OAuth provides a method for making authenticated HTTP requests using 134 a token - an identifier used to denote an access grant with specific 135 scope, duration, and other attributes. Tokens are issued to third- 136 party clients by an authorization server with the approval of the 137 resource owner. Instead of sharing their credentials with the 138 client, resource owners grant access by authenticating directly with 139 the authorization server which in turn issues a token to the client. 140 The client uses the token (and optional secret) to authenticate with 141 the resource server and gain access. 143 For example, a web user (resource owner) can grant a printing service 144 (client) access to her protected photos stored at a photo sharing 145 service (resource server), without sharing her username and password 146 with the printing service. Instead, she authenticates directly with 147 the photo sharing service (authorization server) which issues the 148 printing service delegation-specific credentials (token). 150 This specification defines the use of OAuth over HTTP [RFC2616] (or 151 HTTP over TLS 1.0 as defined by [RFC2818]. Other specifications may 152 extend it for use with other tranport protocols. 154 2.1. Terminology 156 resource server 157 An HTTP [RFC2616] server capable of accepting authenticated 158 resource requests using the OAuth protocol. 160 protected resource 161 An access-restricted resource which can be obtained from a 162 resource server using an OAuth-authenticated request. 164 client 165 An HTTP client capable of making authenticated requests for 166 protected resources using the OAuth protocol. 168 resource owner 169 An entity capable of granting access to a protected resource. 171 end-user 172 A human resource owner. 174 access token 175 A unique identifier used by the client to make authenticated 176 requests on behalf of the resource owner. Access tokens may 177 have a matching secret. 179 bearer token An access token without a matching secret, used to 180 obtain access to a protected resource by simply presenting the 181 access token as-is to the resource server. 183 authorization server 184 An HTTP server capable of issuing tokens after successfully 185 authenticating the resource owner and obtaining authorization. 186 The authorization server may be the same server as the resource 187 server, or a separate entity. 189 authorization endpoint 190 The authorization server's HTTP endpoint capable of 191 authenticating the resource owner and obtaining authorization. 193 token endpoint 194 The authorization server's HTTP endpoint capable of issuing 195 tokens and refreshing expired tokens. 197 client identifier 198 An unique identifier issued to the client to identify itself to 199 the authorization server. Client identifiers may have a 200 matching secret. 202 refresh token 203 A unique identifier used by the client to replace an expired 204 access token with a new access token without having to involve 205 the resource owner. A refresh token is used when the access 206 token is valid for a shorter time period than the duration of 207 the access grant approved by the resource owner. 209 2.2. Overview 211 Clients interact with a protected resource, first by requesting 212 access (which is granted in the form of an access token) from the 213 authorization server, and then by authenticating with the resource 214 server by presenting the access token. Figure 1 demonstrates the 215 flow between the client and authorization server (A, B), and the flow 216 between the client and resource server (C, D), when the client is 217 acting autonomously (the client is also the resource owner). 219 +--------+ +---------------+ 220 | |--(A)------ Credentials --------->| Authorization | 221 | | | Server | 222 | |<-(B)------ Access Token ---------| | 223 | | (w/ Optional Refresh Token) +---------------+ 224 | Client | 225 | | HTTP Request +---------------+ 226 | |--(C)--- with Access Token ------>| Resource | 227 | | | Server | 228 | |<-(D)------ HTTP Response --------| | 229 +--------+ +---------------+ 231 Figure 1 233 Access token strings can use any internal structure agreed upon 234 between the authorization server and the resource server, but their 235 structure is opaque to the client. Since the access token provides 236 the client access to the protected resource for the life of the 237 access token (or until revoked), the authorization server should 238 issue access tokens which expire within an appropriate time, usually 239 much shorter than the duration of the access grant. 241 When an access token expires, the client can request a new access 242 token from the authorization server by presenting its credentials 243 again (Figure 1), or by using the refresh token (if issued with the 244 access token) as shown in Figure 2. Once an expired access token has 245 been replaced with a new access token (A, B), the client uses the new 246 access token as before (C, D). 248 +--------+ +---------------+ 249 | |--(A)------ Refresh Token ------->| Authorization | 250 | | | Server | 251 | |<-(B)------ Access Token ---------| | 252 | | (with Optional Secret) +---------------+ 253 | Client | 254 | | HTTP Request +---------------+ 255 | |--(C)--- with Access Token ------>| Resource | 256 | | | Server | 257 | |<-(D)----- HTTP Response ---------| | 258 +--------+ +---------------+ 260 Figure 2 262 This specification defines a number of authorization flows to support 263 different client types and scenarios. These authorization flows can 264 be separated into three groups: user delegation flows, end-user 265 credentials flows, and autonomous flows. 267 Additional authorization flows may be defined by other specifications 268 to cover different scenarios and client types. 270 User delegation flows are used to grant client access to protected 271 resources by the end-user without sharing the end-user credentials 272 (e.g. a username and password) with the client. Instead, the end- 273 user authenticates directly with the authorization server, and grants 274 client access to its protected resources. The user delegation flows 275 defined by this specifications are: 277 o User-Agent Flow - This flow is designed for clients running inside 278 a user-agent (typically a web browser). This flow is described in 279 Section 3.5. 281 o Web Server Flow - This flow is optimized for clients that are part 282 of a web server application, accessible via HTTP requests. This 283 flow is described in Section 3.6. 285 o Device Flow - This flow is suitable for clients executing on 286 limited devices, but where the end-user has separate access to a 287 user-agent on another computer or device. This flow is described 288 in Section 3.7. 290 End-user credentials flow enable clients with direct access to the 291 end-user's credentials to exchange them for an access token without 292 seeking additional authorization. These flows are only suitable when 293 there is a high degree of trust between the end-user and the client. 294 The end-user credentials flow defined by this specification is: 296 o Username and Password Flow - This flow is used in cases where the 297 end-user trusts the client to handle its credentials but it is 298 still undesirable for the client to store the end-user's username 299 and password. This flow is described in Section 4. 301 Autonomous flows enable clients to act for their own behalf (the 302 client is also the resource owner). The autonomous authorization 303 flows defined by this specifications are: 305 o Client Credentials Flow - The client uses its credentials to 306 obtain an access token. This flow is described in Section 5. 308 o Assertion Flow - The client presents an assertion such as a SAML 309 [OASIS.saml-core-2.0-os] assertion to the authorization server in 310 exchange for an access token. This flow is described in 311 Section 6. 313 2.3. Example 315 [[ Todo ]] 317 2.4. Notational Conventions 319 The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL NOT', 320 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'MAY', and 'OPTIONAL' in this 321 document are to be interpreted as described in [RFC2119]. 323 This document uses the Augmented Backus-Naur Form (ABNF) notation of 324 [I-D.ietf-httpbis-p1-messaging]. Additionally, the realm and auth- 325 param rules are included from [RFC2617], and the URI-Reference rule 326 from [RFC3986]. 328 2.5. Conformance 330 An implementation is not compliant if it fails to satisfy one or more 331 of the MUST or REQUIRED level requirements for the flows it 332 implements. An implementation that satisfies all the MUST or 333 REQUIRED level and all the SHOULD level requirements for its flows is 334 said to be "unconditionally compliant"; one that satisfies all the 335 MUST level requirements but not all the SHOULD level requirements for 336 its flows is said to be "conditionally compliant." 338 3. Obtaining an Access Token 340 The client obtains an access token by using one of the authorization 341 flows supported by the authorization server. The authorization flows 342 all use the same authorization and token endpoints, each with a 343 different set of request parameters and values. 345 Access tokens have a scope, duration, and other access attributes 346 granted by the resource owner. These attributes MUST be enforced by 347 the resource server when receiving a protected resource request, and 348 by the authorization server when receiving a token refresh request. 350 In many cases it is desirable to issue access tokens with a shorter 351 lifetime than the duration of the authorization grant. However, it 352 may be undesirable to require the resource owner to authorize the 353 request again. Instead, the authorization server issues a refresh 354 token in addition to the access token. When the access token 355 expires, the client can request a new access token without involving 356 the resource owner as long as the authorization grant is still valid. 357 The token refresh method is described in Section 7. 359 3.1. Authorization Endpoint 361 Clients direct the resource owner to the authorization endpoint to 362 approve their access request. Before granting access, the resource 363 owner first authenticates with the authorization server. The way in 364 which the authorization server authenticates the end-user (e.g. 365 username and password login, OpenID, session cookies) and in which 366 the authorization server obtains the end-user's authorization, 367 including whether it uses a secure channel such as TLS/SSL, is beyond 368 the scope of this specification. However, the authorization server 369 MUST first verify the identity of the end-user. 371 The URI of the authorization endpoint can be found in the service 372 documentation, or can be obtained by the client by making an 373 unauthorized protected resource request (from the "WWW-Authenticate" 374 response header auth-uri (Section 9.1.2) attribute). 376 The authorization endpoint advertised by the resource server MAY 377 include a query component as defined by [RFC3986] section 3. 379 Since requests to the authorization endpoint result in user 380 authentication and the transmission of sensitive values, the 381 authorization server SHOULD require the use of a transport-layer 382 mechanism such as TLS/SSL (or a secure channel with equivalent 383 protections) when sending requests to the authorization endpoints. 385 3.2. Token Endpoint 387 After obtaining authorization from the resource owner, clients 388 request an access token from the authorization server's token 389 endpoint. 391 The URI of the token endpoint can be found in the service 392 documentation, or can be obtained by the client by making an 393 unauthorized protected resource request (from the "WWW-Authenticate" 394 response header token-uri (Section 9.1.2) attribute). 396 The token endpoint advertised by the resource server MAY include a 397 query component as defined by [RFC3986] section 3. 399 Since requests to the token endpoint result in the transmission of 400 plain text credentials in the HTTP request and response, the 401 authorization server MUST require the use of a transport-layer 402 mechanism such as TLS/SSL (or a secure channel with equivalent 403 protections) when sending requests to the token endpoints. 405 3.2.1. Response Format 407 Authorization servers respond to client requests by including a set 408 of response parameters in the entity body of the HTTP response. The 409 response uses the "application/json" media type as defined by 410 [RFC4627]. 412 The parameters are serialized into a JSON structure by adding each 413 parameter at the highest strucutre level. Parameter names and string 414 values are included as JSON strings. Numerical number are included 415 as JSON numbers. 417 The authorization server MUST include the HTTP "Cache-Control" 418 response header field with a value of "no-store" in any response 419 containing tokens, secrets, or other sensitive information. 421 3.2.1.1. Access Token Response 423 After recieving and verifying a valid and authorized access token 424 request from the client (as described in each of the flows below), 425 the authorization server constructs a JSON-formatted response which 426 includes the common parameters set as well as additional flow- 427 specific parameters. The formatted parameters are sent to the client 428 in the entity body of the HTTP response with a 200 status code (OK). 430 The token response contains the following common parameters: 432 access_token 433 REQUIRED. The access token issued by the authorization server. 435 expires_in 436 OPTIONAL. The duration in seconds of the access token 437 lifetime. 439 refresh_token 440 OPTIONAL. The refresh token used to obtain new access tokens 441 using the same end-user access grant as described in Section 7. 443 access_token_secret 444 REQUIRED if requested by the client. The corresponding access 445 token secret as requested by the client. 447 For example (line breaks are for display purposes only): 449 HTTP/1.1 200 OK 450 Content-Type: application/json 451 Cache-Control: no-store 453 {"access_token":"SlAV32hkKG","expires_in":3600, 454 "refresh_token":"8xLOxBtZp8"} 456 3.2.1.2. Error Response 458 If the token request is invalid or unauthorized, the authorization 459 server constructs a JSON-formatted response which includes the common 460 parameters set as well as additional flow-specific parameters. The 461 formatted parameters are sent to the client in the entity body of the 462 HTTP response with a 400 status code (Bad Request). 464 The response contains the following common parameter: 466 error 467 REQUIRED. The parameter value MUST be set to one of the values 468 specified by each flow. 470 For example: 472 HTTP/1.1 400 Bad Request 473 Content-Type: application/json 474 Cache-Control: no-store 476 {"error":"incorrect_client_credentials"} 478 3.3. Flow Parameters 480 The sizes of tokens and other values received from the authorization 481 server, are left undefined by this specification. Clients should 482 avoid making assumptions about value sizes. Servers should document 483 the expected size of any value they issue. 485 Unless otherwise noted, all the protocol parameter names and values 486 are case sensitive. 488 3.4. Client Credentials 490 When requesting access from the authorization server, the client 491 identifies itself using its authorization-server-issued client 492 credentials. The client credentials include a client identifier and 493 an OPTIONAL symmetric shared secret. The means through which the 494 client obtains these credentials are beyond the scope of this 495 specification, but usually involve registration with the 496 authorization server. 498 The client identifier is used by the authorization server to 499 establish the identity of the client for the purpose of presenting 500 information to the resource owner prior to granting access, as well 501 as for providing different service levels to different clients. They 502 can also be used to block unauthorized clients from requesting 503 access. 505 Due to the nature of some clients, authorization servers SHOULD NOT 506 make assumptions about the confidentiality of client credentials 507 without establishing trust with the client operator. Authorization 508 servers SHOULD NOT issue client secrets to clients incapable of 509 keeping their secrets confidential. 511 3.5. User-Agent Flow 513 The user-agent flow is a user delegation flow suitable for client 514 applications residing in a user-agent, typically implemented in a 515 browser using a scripting language such as JavaScript. These clients 516 cannot keep client secrets confidential and the authentication of the 517 client is based on the user-agent's same-origin policy. 519 Unlike other flows in which the client makes separate authorization 520 and access token requests, the client received the access token as a 521 result of the authorization request in the form of an HTTP 522 redirection. The client requests the authorization server to 523 redirect the user-agent to another web server or local resource 524 accessible to the browser which is capable of extracting the access 525 token from the response and passing it to the client. 527 This user-agent flow does not utilize the client secret since the 528 client executables reside on the end-user's computer or device which 529 makes the client secret accessible and exploitable. Because the 530 access token is encoded into the redirection URI, it may be exposed 531 to the end-user and other applications residing on the computer or 532 device. 534 +----------+ Client Identifier +----------------+ 535 | |>---(A)-- & Redirection URI --->| | 536 | | | | 537 End <--+ - - - +----(B)-- User authenticates -->| Authorization | 538 User | | | Server | 539 | |<---(C)-- Redirect URI --------<| | 540 | Client | with Access Token | | 541 | in | (w/ Optional Refresh Token) +----------------+ 542 | Browser | in Fragment 543 | | +----------------+ 544 | |>---(D)-- Redirect URI -------->| | 545 | | without Fragment | Web Server | 546 | | | with Client | 547 | (F) |<---(E)-- Web Page with -------<| Resource | 548 | Access | Script | | 549 | Token | +----------------+ 550 +----------+ 552 Figure 3 554 The user-agent flow illustrated in Figure 3 includes the following 555 steps: 557 (A) The client sends the user-agent to the authorization server and 558 includes its client identifier and redirection URI in the 559 request. 561 (B) The authorization server authenticates the end-user (via the 562 user-agent) and establishes whether the end-user grants or 563 denies the client's access request. 565 (C) Assuming the end-user granted access, the authorization server 566 redirects the user-agent to the redirection URI provided 567 earlier. The redirection URI includes the access token in the 568 URI fragment. 570 (D) The user-agent follows the redirection instructions by making a 571 request to the web server which does not include the fragment. 572 The user-agent retains the fragment information locally. 574 (E) The web server returns a web page containing a script capable of 575 extracting the access token from the URI fragment retained by 576 the user-agent. 578 (F) The user-agent executes the script provided by the web server 579 which extracts the access token and passes it to the client. 581 3.5.1. Client Requests Authorization 583 In order for the end-user to grant the client access, the client 584 sends the end-user to the authorization server. The client 585 constructs the request URI by adding the following URI query 586 parameters to the user authorization endpoint URI: 588 type 589 REQUIRED. The parameter value MUST be set to "user_agent". 591 client_id 592 REQUIRED. The client identifier as described in Section 3.4. 594 redirect_uri 595 REQUIRED unless a redirection URI has been established between 596 the client and authorization server via other means. An 597 absolute URI to which the authorization server will redirect 598 the user-agent to when the end-user authorization step is 599 completed. The authorization server SHOULD require the client 600 to pre-register their redirection URI. Authorization servers 601 MAY restrict the redirection URI to not include a query 602 component as defined by [RFC3986] section 3. 604 state 605 OPTIONAL. An opaque value used by the client to maintain state 606 between the request and callback. The authorization server 607 includes this value when redirecting the user-agent back to the 608 client. 610 scope 611 OPTIONAL. The scope of the access request expressed as a list 612 of space-delimited strings. The value of the "scope" parameter 613 is defined by the authorization server. If the value contains 614 multiple space-delimited strings, their order does not matter, 615 and each string adds additional access range to the requested 616 scope. 618 immediate 619 OPTIONAL. The parameter value must be set to "true" or 620 "false". If set to "true", the authorization server MUST NOT 621 prompt the end-user to authenticate or approve access. 623 Instead, the authorization server attempts to establish the 624 end-user's identity via other means (e.g. browser cookies) and 625 checks if the end-user has previously approved an identical 626 access request by the same client and if that access grant is 627 still active. If the authorization server does not support an 628 immediate check or if it is unable to establish the end-user's 629 identity or approval status, it MUST deny the request without 630 prompting the end-user. Defaults to "false" if omitted. 632 secret_type 633 OPTIONAL. The access token secret type as described by 634 Section 8.3. If omitted, the authorization server will issue a 635 bearer token (an access token without a matching secret) as 636 described by Section 8.2. 638 The client directs the end-user to the constructed URI using an HTTP 639 redirection response, or by other means available to it via the end- 640 user's user-agent. The request MUST use the HTTP "GET" method. 642 For example, the client directs the end-user's user-agent to make the 643 following HTTPS request (line breaks are for display purposes only): 645 GET /authorize?type=user_agent&client_id=s6BhdRkqt3& 646 redirect_uri=https%3A%2F%2FEexample%2Ecom%2Frd HTTP/1.1 647 Host: server.example.com 649 If the client has previously registered a redirection URI with the 650 authorization server, the authorization server MUST verify that the 651 redirection URI received matches the registered URI associated with 652 the client identifier. 654 The authorization server authenticates the end-user and obtains an 655 authorization decision (by asking the end-user or establishing 656 approval via other means). The authorization server sends the end- 657 user's user-agent to the provided client redirection URI using an 658 HTTP redirection response. 660 3.5.1.1. End-user Grants Authorization 662 If the end-user authorizes the access request, the authorization 663 server issues an access token and delivers it to the client by adding 664 the following parameters, using the 665 "application/x-www-form-urlencoded" format as defined by 666 [W3C.REC-html40-19980424], to the redirection URI fragment: 668 access_token 669 REQUIRED. The access token. 671 expires_in 672 OPTIONAL. The duration in seconds of the access token 673 lifetime. 675 refresh_token 676 OPTIONAL. The refresh token. 678 state 679 REQUIRED if the "state" parameter was present in the client 680 authorization request. Set to the exact value received from 681 the client. 683 access_token_secret 684 REQUIRED if requested by the client. The corresponding access 685 token secret as requested by the client. 687 For example, the authorization server redirects the end-user's user- 688 agent by sending the following HTTP response: 690 HTTP/1.1 302 Found 691 Location: http://example.com/rd#access_token=FJQbwq9&expires_in=3600 693 3.5.1.2. End-user Denies Authorization 695 If the end-user denied the access request, the authorization server 696 responds to the client by adding the following parameters, using the 697 "application/x-www-form-urlencoded" format as defined by 698 [W3C.REC-html40-19980424], to the redirection URI fragment: 700 error 701 REQUIRED. The parameter value MUST be set to "user_denied". 703 state 704 REQUIRED if the "state" parameter was present in the client 705 authorization request. Set to the exact value received from 706 the client. 708 For example, the authorization server responds with the following: 710 HTTP/1.1 302 Found 711 Location: http://example.com/rd#error=user_denied 713 The authorization flow concludes unsuccessfully. To extract the 714 error message, the client follows the steps described in 715 Section 3.5.2. 717 3.5.2. Client Extracts Access Token 719 The user-agent follows the authorization server redirection response 720 by making an HTTP "GET" request to the URI received in the "Location" 721 HTTP response header. The user-agent SHALL NOT include the fragment 722 component with the request. 724 For example, the user-agent makes the following HTTP "GET" request in 725 response to the redirection directive received from the authorization 726 server: 728 GET /rd HTTP/1.1 729 Host: example.com 731 The HTTP response to the redirection request returns a web page 732 (typically an HTML page with an embedded script) capable of accessing 733 the full redirection URI including the fragment retained by the user- 734 agent, and extracting the access token (and other parameters) 735 contained in the fragment. 737 3.6. Web Server Flow 739 The web server flow is a user delegation flow suitable for clients 740 capable of interacting with the end-user's user-agent (typically a 741 web browser) and capable of receiving incoming requests from the 742 authorization server (capable of acting as an HTTP server). 744 +----------+ Client Identifier +---------------+ 745 | -+----(A)-- & Redirect URI ------->| | 746 | End-user | | Authorization | 747 | at |<---(B)-- User authenticates --->| Server | 748 | Browser | | | 749 | -+----(C)-- Verification Code ----<| | 750 +-|----|---+ +---------------+ 751 | | ^ v 752 (A) (C) | | 753 | | | | 754 ^ v | | 755 +---------+ | | 756 | |>---(D)-- Client Credentials, --------' | 757 | Web | Verification Code, | 758 | Client | & Redirect URI | 759 | | | 760 | |<---(E)------- Access Token -----------------' 761 +---------+ (w/ Optional Refresh Token) 763 Figure 4 765 The web server flow illustrated in Figure 4 includes the following 766 steps: 768 (A) The web client initiates the flow by redirecting the end-user's 769 user-agent to the authorization endpoint with its client 770 identifier and a redirect URI to which the authorization server 771 will send the end-user back once authorization is received (or 772 denied). 774 (B) The authorization server authenticates the end-user (via the 775 user-agent) and establishes whether the end-user grants or 776 denies the client's access request. 778 (C) Assuming the end-user granted access, the authorization server 779 redirects the user-agent back to the client to the redirection 780 URI provided earlier. The authorization includes a verification 781 code for the client to use to obtain an access token. 783 (D) The client requests an access token from the authorization 784 server by including its client credentials (identifier and 785 secret), as well as the verification code received in the 786 previous step. 788 (E) The authorization server validates the client credentials and 789 the verification code and responds back with the access token. 791 3.6.1. Client Requests Authorization 793 In order for the end-user to grant the client access, the client 794 sends the end-user to the authorization server. The client 795 constructs the request URI by adding the following URI query 796 parameters to the user authorization endpoint URI: 798 type 799 REQUIRED. The parameter value MUST be set to "web_server". 801 client_id 802 REQUIRED. The client identifier as described in Section 3.4. 804 redirect_uri 805 REQUIRED unless a redirection URI has been established between 806 the client and authorization server via other means. An 807 absolute URI to which the authorization server will redirect 808 the user-agent to when the end-user authorization step is 809 completed. The authorization server MAY require the client to 810 pre-register their redirection URI. Authorization servers MAY 811 restrict the redirection URI to not include a query component 812 as defined by [RFC3986] section 3. 814 state 815 OPTIONAL. An opaque value used by the client to maintain state 816 between the request and callback. The authorization server 817 includes this value when redirecting the user-agent back to the 818 client. 820 scope 821 OPTIONAL. The scope of the access request expressed as a list 822 of space-delimited strings. The value of the "scope" parameter 823 is defined by the authorization server. If the value contains 824 multiple space-delimited strings, their order does not matter, 825 and each string adds additional access range to the requested 826 scope. 828 immediate 829 OPTIONAL. The parameter value must be set to "true" or 830 "false". If set to "true", the authorization server MUST NOT 831 prompt the end-user to authenticate or approve access. 832 Instead, the authorization server attempts to establish the 833 end-user's identity via other means (e.g. browser cookies) and 834 checks if the end-user has previously approved an identical 835 access request by the same client and if that access grant is 836 still active. If the authorization server does not support an 837 immediate check or if it is unable to establish the end-user's 838 identity or approval status, it MUST deny the request without 839 prompting the end-user. Defaults to "false" if omitted. 841 The client directs the end-user to the constructed URI using an HTTP 842 redirection response, or by other means available to it via the end- 843 user's user-agent. The request MUST use the HTTP "GET" method. 845 For example, the client directs the end-user's user-agent to make the 846 following HTTPS requests (line breaks are for display purposes only): 848 GET /authorize?type=web_server&client_id=s6BhdRkqt3&redirect_uri= 849 https%3A%2F%2Fclient%2Eexample%2Ecom%2Fcb HTTP/1.1 850 Host: server.example.com 852 If the client has previously registered a redirection URI with the 853 authorization server, the authorization server MUST verify that the 854 redirection URI received matches the registered URI associated with 855 the client identifier. 857 The authorization server authenticates the end-user and obtains an 858 authorization decision (by asking the end-user or establishing 859 approval via other means). The authorization server sends the end- 860 user's user-agent to the provided client redirection URI using an 861 HTTP redirection response, or by other means available to it via the 862 end-user's user-agent. 864 3.6.1.1. End-user Grants Authorization 866 If the end-user authorizes the access request, the authorization 867 server generates a verification code and associates it with the 868 client identifier and redirection URI. The authorization server 869 constructs the request URI by adding the following parameters to the 870 query component of redirection URI provided by the client: 872 code 873 REQUIRED. The verification code generated by the authorization 874 server. 876 state 877 REQUIRED if the "state" parameter was present in the client 878 authorization request. Set to the exact value received from 879 the client. 881 The verification code should expire shortly after it is issued and 882 allowed for a single use. 884 For example, the authorization server redirects the end-user's user- 885 agent by sending the following HTTP response: 887 HTTP/1.1 302 Found 888 Location: https://client.example.com/cb?code=i1WsRn1uB1 890 In turn, the end-user's user-agent makes the following HTTPS "GET" 891 request: 893 GET /cb?code=i1WsRn1uB1 HTTP/1.1 894 Host: client.example.com 896 3.6.1.2. End-user Denies Authorization 898 If the end-user denied the access request, the authorization server 899 constructs the request URI by adding the following parameters to the 900 query component of the redirection URI provided by the client: 902 error 903 REQUIRED. The parameter value MUST be set to "user_denied". 905 state 906 REQUIRED if the "state" parameter was present in the client 907 authorization request. Set to the exact value received from 908 the client. 910 For example, the authorization server directs the client to make the 911 following HTTP request: 913 GET /cb?error=user_denied HTTP/1.1 914 Host: client.example.com 916 The authorization flow concludes unsuccessfully. 918 3.6.2. Client Requests Access Token 920 The client obtains an access token from the authorization server by 921 making an HTTP "POST" request to the token endpoint. The client 922 constructs a request URI by adding the following parameters to the 923 request: 925 type 926 REQUIRED. The parameter value MUST be set to "web_server". 928 client_id 929 REQUIRED. The client identifier as described in Section 3.4. 931 client_secret 932 REQUIRED if the client identifier has a matching secret. The 933 client secret as described in Section 3.4. 935 code 936 REQUIRED. The verification code received from the 937 authorization server. 939 redirect_uri 940 REQUIRED. The redirection URI used in the initial request. 942 secret_type 943 OPTIONAL. The access token secret type as described by 944 Section 8.3. If omitted, the authorization server will issue a 945 bearer token (an access token without a matching secret) as 946 described by Section 8.2. 948 For example, the client makes the following HTTPS request (line 949 breaks are for display purposes only): 951 POST /token HTTP/1.1 952 Host: server.example.com 953 Content-Type: application/x-www-form-urlencoded 955 type=web_server&client_id=s6BhdRkqt3& 956 client_secret=gX1fBat3bV&code=i1WsRn1uB1& 957 redirect_uri=https%3A%2F%2Fclient%2Eexample%2Ecom%2Fcb 959 The authorization server MUST verify that the verification code, 960 client identity, client secret, and redirection URI are all valid and 961 match its stored association. If the request is valid, the 962 authorization server issues a successful response as described in 963 Section 3.2.1.1. 965 For example (line breaks are for display purposes only): 967 HTTP/1.1 200 OK 968 Content-Type: application/json 969 Cache-Control: no-store 971 {"access_token":"SlAV32hkKG","expires_in":3600, 972 "refresh_token":"8xLOxBtZp8"} 974 If the request is invalid, the authorization server returns an error 975 response as described in Section 3.2.1.2 with one of the following 976 error codes: 978 o "redirect_uri_mismatch" 980 o "bad_verification_code" 982 o "incorrect_client_credentials" 984 For example: 986 HTTP/1.1 400 Bad Request 987 Content-Type: application/json 988 Cache-Control: no-store 990 {"error":"incorrect_client_credentials"} 992 3.7. Device Flow 994 The device flow is a user delegation flow suitable for clients 995 executing on devices which do not have an easy data-entry method 996 (e.g. game consoles or media hub), but where the end-user has 997 separate access to a user-agent on another computer or device (e.g. 998 home computer, a laptop, or a smartphone). The client is incapable 999 of receiving incoming requests from the authorization server 1000 (incapable of acting as an HTTP server). 1002 Instead of interacting with the end-user's user-agent, the client 1003 instructs the end-user to use another computer or device and connect 1004 to the authorization server to approve the access request. Since the 1005 client cannot receive incoming requests, it polls the authorization 1006 server repeatedly until the end-user completes the approval process. 1008 This device flow does not utilize the client secret since the client 1009 executables reside on a local device which makes the client secret 1010 accessible and exploitable. 1012 +----------+ +----------------+ 1013 | |>---(A)-- Client Identifier --->| | 1014 | | | | 1015 | |<---(B)-- Verification Code, --<| | 1016 | | User Code, | | 1017 | | & Verification URI | | 1018 | Device | | | 1019 | Client | Client Identifier & | | 1020 | |>---(E)-- Verification Code --->| | 1021 | | ... | | 1022 | |>---(E)---> | | 1023 | | | Authorization | 1024 | |<---(F)-- Access Token --------<| Server | 1025 +----------+ (w/ Optional Refresh Token) | | 1026 v | | 1027 : | | 1028 (C) User Code & Verification URI | | 1029 : | | 1030 v | | 1031 +----------+ | | 1032 | End-user | | | 1033 | at |<---(D)-- User authenticates -->| | 1034 | Browser | | | 1035 +----------+ +----------------+ 1037 Figure 5 1039 The device flow illustrated in Figure 5 includes the following steps: 1041 (A) The client requests access from the authorization server and 1042 includes its client identifier in the request. 1044 (B) The authorization server issues a verification code, a user 1045 code, and provides the end-user authorization URI. 1047 (C) The client instructs the end-user to use its user-agent 1048 (elsewhere) and visit the provided authorization URI. The 1049 client provides the user with the user code to enter in order to 1050 grant access. 1052 (D) The authorization server authenticates the end-user (via the 1053 user-agent) and prompts the end-user to grant the client's 1054 access request by entering the user code provided by the client. 1056 (E) While the end-user authorizes (or denies) the client's request 1057 (D), the client repeatedly polls the authorization server to 1058 find out if the end-user completed the user authorization step. 1059 The client includes the verification code and its client 1060 identifier. 1062 (F) Assuming the end-user granted access, the authorization server 1063 validates the verification code provided by the client and 1064 responds back with the access token. 1066 3.7.1. Client Requests Authorization 1068 The client initiates the flow by requesting a set of verification 1069 codes from the authorization server by making an HTTP "GET" request 1070 to the token endpoint. The client constructs a request URI by adding 1071 the following parameters to the request: 1073 type 1074 REQUIRED. The parameter value MUST be set to "device_code". 1076 client_id 1077 REQUIRED. The client identifier as described in Section 3.4. 1079 scope 1080 OPTIONAL. The scope of the access request expressed as a list 1081 of space-delimited strings. The value of the "scope" parameter 1082 is defined by the authorization server. If the value contains 1083 multiple space-delimited strings, their order does not matter, 1084 and each string adds additional access range to the requested 1085 scope. 1087 For example, the client makes the following HTTPS request (line 1088 breaks are for display purposes only): 1090 GET /token?type=device_code&client_id=s6BhdRkqt3 1091 HTTP/1.1 1092 Host: server.example.com 1094 In response, the authorization server generates a verification code 1095 and a user code and includes them in the HTTP response body using the 1096 "application/json" format as desribed by Section 3.2.1 with a 200 1097 status code (OK). The response contains the following parameters: 1099 code 1100 REQUIRED. The verification code. 1102 user_code 1103 REQUIRED. The user code. 1105 user_uri 1106 REQUIRED. The user authorization URI on the authorization 1107 server. 1109 expires_in 1110 OPTIONAL. The duration in seconds of the verification code 1111 lifetime. 1113 interval 1114 OPTIONAL. The minimum amount of time in seconds that the 1115 client SHOULD wait between polling requests to the token 1116 endpoint. 1118 For example (line breaks are for display purposes only): 1120 HTTP/1.1 200 OK 1121 Content-Type: application/json 1122 Cache-Control: no-store 1124 {"code":"74tq5miHKB","user_code":"94248","user_uri":"http%3A%2F%2 1125 Fwww%2Eexample%2Ecom%2Fdevice","interval"=5} 1127 The client displays the user code and the user authorization URI to 1128 the end-user, and instructs the end-user to visit the URI using a 1129 user-agent and enter the user code. 1131 The end-user manually types the provided URI and authenticates with 1132 the authorization server. The authorization server prompts the end- 1133 user to authorize the client's request by entering the user code 1134 provided by the client. Once the end-user approves or denies the 1135 request, the authorization server informs the end-user to return to 1136 the device for further instructions. 1138 3.7.2. Client Requests Access Token 1140 Since the client is unable to receive incoming requests from the 1141 authorization server, it polls the authorization server repeatedly 1142 until the end-user grants or denies the request, or the verification 1143 code expires. 1145 The client makes the following request at an arbitrary but reasonable 1146 interval which MUST NOT exceed the minimum interval rate provided by 1147 the authorization server (if present via the "interval" parameter). 1148 Alternatively, the client MAY provide a user interface for the end- 1149 user to manually inform it when authorization was granted. 1151 The client requests an access token by making an HTTP "GET" request 1152 to the token endpoint. The client constructs a request URI by adding 1153 the following parameters to the request: 1155 type 1156 REQUIRED. The parameter value MUST be set to "device_token". 1158 client_id 1159 REQUIRED. The client identifier as described in Section 3.4. 1161 code 1162 The verification code received from the authorization server. 1164 secret_type 1165 OPTIONAL. The access token secret type as described by 1166 Section 8.3. If omitted, the authorization server will issue a 1167 bearer token (an access token without a matching secret) as 1168 described by Section 8.2. 1170 For example, the client makes the following HTTPS request (line 1171 breaks are for display purposes only): 1173 GET /token?type=device_token&client_id=s6BhdRkqt3 1174 &code=J2vC42OifV HTTP/1.1 1175 Host: server.example.com 1177 If the end-user authorized the request, the authorization server 1178 issues an access token response as described in Section 3.2.1.1. 1180 For example (line breaks are for display purposes only): 1182 HTTP/1.1 200 OK 1183 Content-Type: application/json 1184 Cache-Control: no-store 1186 {"access_token":"SlAV32hkKG","expires_in":3600, 1187 "refresh_token":"8xLOxBtZp8"} 1189 If the request is invalid, the authorization server returns an error 1190 response as described in Section 3.2.1.2 with one of the following 1191 error codes: 1193 o "authorization_declined" 1195 o "bad_verification_code" 1197 For example: 1199 HTTP/1.1 400 Bad Request 1200 Content-Type: application/json 1201 Cache-Control: no-store 1203 {"error":"authorization_declined"} 1205 If the end-user authorization is pending or expired without receiving 1206 any response from the end-user, or the client is exceeding the 1207 allowed polling interval, the authorization server returns an error 1208 response as described in Section 3.2.1.2 with one of the following 1209 error codes: 1211 o "'authorization_pending" 1213 o "slow_down" 1215 o "code_expired" 1217 For example: 1219 HTTP/1.1 400 Bad Request 1220 Content-Type: application/json 1221 Cache-Control: no-store 1223 {"error":"authorization_pending"} 1225 4. Username and Password Flow 1227 The username and password flow is an end-user credentials flow 1228 suitable for clients capable of asking end users for their usernames 1229 and passwords. It is also used to migrate existing clients using 1230 direct authentication schemes such as HTTP Basic or Digest 1231 authentication to OAuth by converting the end-user credentials stored 1232 with tokens. 1234 However, unlike the HTTP Basic authentication scheme defined in 1235 [RFC2617], the end-user's credentials are used in a single request 1236 and are exchanged for an access token and refresh token which 1237 eliminates the client need to store them for future use. 1239 The methods through which the client prompts end users for their 1240 usernames and passwords is beyond the scope of this specification. 1241 The client MUST discard the usernames and passwords once an access 1242 token has been obtained. 1244 This flow is suitable in cases where the end-user already has a trust 1245 relationship with the client, such as its computer operating system 1246 or highly privileged applications. Authorization servers should take 1247 special care when enabling the username and password flow, and only 1248 when other delegation flows are not viable. 1250 End-user 1251 v 1252 : 1253 (A) 1254 : 1255 v 1256 +--------+ +---------------+ 1257 | | Client Credentials | | 1258 | |>--(B)--- & User Credentials ---->| Authorization | 1259 | Client | | Server | 1260 | |<--(C)---- Access Token ---------<| | 1261 | | (w/ Optional Refresh Token) | | 1262 +--------+ +---------------+ 1264 Figure 6 1266 The username and password flow illustrated in Figure 6 includes the 1267 following steps: 1269 (A) The end-user provides the client with its username and password. 1271 (B) The client sends an access token request to the authorization 1272 server and includes its client identifier and client secret, and 1273 the end-user's username and password. 1275 (C) The authorization server validates the end-user credentials and 1276 the client credentials and issues an access token. 1278 4.1. Client Requests Access Token 1280 The client requests an access token by making an HTTP "POST" request 1281 to the token endpoint. The client constructs a request URI by adding 1282 the following parameters to the request: 1284 type 1285 REQUIRED. The parameter value MUST be set to "username". 1287 client_id 1288 REQUIRED. The client identifier as described in Section 3.4. 1290 client_secret 1291 REQUIRED. The client secret as described in Section 3.4. 1292 OPTIONAL if no client secret was issued. 1294 username 1295 REQUIRED. The end-user's username. 1297 password 1298 REQUIRED. The end-user's password. 1300 scope 1301 OPTIONAL. The scope of the access request expressed as a list 1302 of space-delimited strings. The value of the "scope" parameter 1303 is defined by the authorization server. If the value contains 1304 multiple space-delimited strings, their order does not matter, 1305 and each string adds additional access range to the requested 1306 scope. 1308 secret_type 1309 OPTIONAL. The access token secret type as described by 1310 Section 8.3. If omitted, the authorization server will issue a 1311 bearer token (an access token without a matching secret) as 1312 described by Section 8.2. 1314 For example, the client makes the following HTTPS request (line 1315 breaks are for display purposes only): 1317 POST /token HTTP/1.1 1318 Host: server.example.com 1320 type=username&client_id=s6BhdRkqt3&client_secret= 1321 47HDu8s&username=johndoe&password=A3ddj3w 1323 The authorization server MUST validate the client credentials and 1324 end-user credentials and if valid issues an access token response as 1325 described in Section 3.2.1.1. 1327 For example (line breaks are for display purposes only): 1329 HTTP/1.1 200 OK 1330 Content-Type: application/json 1331 Cache-Control: no-store 1333 {"access_token":"SlAV32hkKG","expires_in":3600, 1334 "refresh_token":"8xLOxBtZp8"} 1336 If the request is invalid, the authorization server returns an error 1337 response as described in Section 3.2.1.2 with one of the following 1338 error codes: 1340 o "incorrect_client_credentials" 1342 o "unauthorized_client'" - The client is not permitted to use this 1343 flow. 1345 For example: 1347 HTTP/1.1 400 Bad Request 1348 Content-Type: application/json 1349 Cache-Control: no-store 1351 {"error":"incorrect_client_credentials"} 1353 5. Client Credentials Flow 1355 The client credentials flow is used when the client acts autonomously 1356 without acting on behalf of a separate resource owner. The client 1357 secret is assumed to be high-entropy since it is not designed to be 1358 memorized by an end-user. 1360 +--------+ +---------------+ 1361 | | | | 1362 | |>--(A)--- Client Credentials ---->| Authorization | 1363 | Client | | Server | 1364 | |<--(B)---- Access Token ---------<| | 1365 | | (w/ Optional Refresh Token) | | 1366 +--------+ +---------------+ 1368 Figure 7 1370 The client credential flow illustrated in Figure 7 includes the 1371 following steps: 1373 (A) The client sends an access token request to the authorization 1374 server and includes its client identifier and client secret. 1376 (B) The authorization server validates the client credentials and 1377 issues an access token. 1379 5.1. Client Requests Access Token 1381 The client requests an access token by making an HTTP "POST" request 1382 to the token endpoint. The client constructs a request URI by adding 1383 the following parameters to the request: 1385 type 1386 REQUIRED. The parameter value MUST be set to 1387 "client_credentials". 1389 client_id 1390 REQUIRED. The client identifier as described in Section 3.4. 1392 client_secret 1393 REQUIRED. The client secret as described in Section 3.4. 1395 scope 1396 OPTIONAL. The scope of the access request expressed as a list 1397 of space-delimited strings. The value of the "scope" parameter 1398 is defined by the authorization server. If the value contains 1399 multiple space-delimited strings, their order does not matter, 1400 and each string adds additional access range to the requested 1401 scope. 1403 secret_type 1404 OPTIONAL. The access token secret type as described by 1405 Section 8.3. If omitted, the authorization server will issue a 1406 bearer token (an access token without a matching secret) as 1407 described by Section 8.2. 1409 For example, the client makes the following HTTPS request (line 1410 breaks are for display purposes only): 1412 POST /token HTTP/1.1 1413 Host: server.example.com 1415 type=client_credentials&client_id=s6BhdRkqt3&client_secret=47HDu8s 1417 The authorization server MUST validate the client credentials and if 1418 valid issues an access token response as described in 1419 Section 3.2.1.1. 1421 For example (line breaks are for display purposes only): 1423 HTTP/1.1 200 OK 1424 Content-Type: application/json 1425 Cache-Control: no-store 1427 {"access_token":"SlAV32hkKG","expires_in":3600, 1428 "refresh_token":"8xLOxBtZp8"} 1430 If the request is invalid, the authorization server returns an error 1431 response as described in Section 3.2.1.2 with one of the following 1432 error codes: 1434 o "incorrect_client_credentials" 1436 For example: 1438 HTTP/1.1 400 Bad Request 1439 Content-Type: application/json 1440 Cache-Control: no-store 1442 {"error":"incorrect_client_credentials"} 1444 6. Assertion Flow 1446 The assertion flow is used when a client wishes to exchange an 1447 existing security token or assertion for an access token. This flow 1448 is suitable when the client is acting autonomously or on behalf of 1449 the end-user (based on the content of the assertion used). 1451 The assertion flow requires the client to obtain a assertion (such as 1452 a SAML [OASIS.saml-core-2.0-os] assertion) from an assertion issuer 1453 or to self-issue an assertion prior to initiating the flow. The 1454 assertion format, the process by which the assertion is obtained, and 1455 the method of validating the assertion are defined by the assertion 1456 issuer and the authorization server, and are beyond the scope of this 1457 specification. 1459 +--------+ +---------------+ 1460 | | | | 1461 | |>--(A)------ Assertion ---------->| Authorization | 1462 | Client | | Server | 1463 | |<--(B)---- Access Token ---------<| | 1464 | | | | 1465 +--------+ +---------------+ 1467 Figure 8 1469 The assertion flow illustrated in Figure 8 includes the following 1470 steps: 1472 (A) The client sends an access token request to the authorization 1473 server and includes an assertion. 1475 (B) The authorization server validates the assertion and issues an 1476 access token. 1478 6.1. Client Requests Access Token 1480 The client requests an access token by making an HTTP "POST" request 1481 to the token endpoint. The client constructs a request URI by adding 1482 the following parameters to the request: 1484 type 1485 REQUIRED. The parameter value MUST be set to "assertion". 1487 format 1488 REQUIRED. The format of the assertion as defined by the 1489 authorization server. The value MUST be an absolute URI. 1491 assertion 1492 REQUIRED. The assertion. 1494 scope 1495 OPTIONAL. The scope of the access request expressed as a list 1496 of space-delimited strings. The value of the "scope" parameter 1497 is defined by the authorization server. If the value contains 1498 multiple space-delimited strings, their order does not matter, 1499 and each string adds additional access range to the requested 1500 scope. 1502 secret_type 1503 OPTIONAL. The access token secret type as described by 1504 Section 8.3. If omitted, the authorization server will issue a 1505 bearer token (an access token without a matching secret) as 1506 described by Section 8.2. 1508 For example, the client makes the following HTTPS request (line 1509 breaks are for display purposes only): 1511 POST /token HTTP/1.1 1512 Host: server.example.com 1514 type=assertion&format=_______&assertion=_______ 1516 The authorization server MUST validate the assertion and if valid 1517 issues an access token response as described in Section 3.2.1.1. The 1518 authorization server SHOULD NOT issue a refresh token. 1520 For example (line breaks are for display purposes only): 1522 HTTP/1.1 200 OK 1523 Content-Type: application/json 1524 Cache-Control: no-store 1526 {"access_token":"SlAV32hkKG","expires_in":3600} 1528 If the request is invalid, the authorization server returns an error 1529 response as described in Section 3.2.1.2 with one of the following 1530 error codes: 1532 o "invalid_assertion" 1533 o "unknown_format" 1535 For example: 1537 HTTP/1.1 400 Bad Request 1538 Content-Type: application/json 1539 Cache-Control: no-store 1541 {"error":"invalid_assertion"} 1543 Authorization servers SHOULD issue access tokens with a limited 1544 lifetime and require clients to refresh them by requesting a new 1545 access token using the same assertion if it is still valid. 1546 Otherwise the client MUST obtain a new valid assertion. 1548 7. Refreshing an Access Token 1550 Token refresh is used when the lifetime of an access token is shorter 1551 than the lifetime of the authorization grant. It allows clients to 1552 obtain a new access token without having to go through the 1553 authorization flow again or involve the resource owner. It is also 1554 used to obtain a new token with different security properties (e.g. 1555 bearer token, token with shared symmetric secret). 1557 +--------+ Client Credentials, +---------------+ 1558 | | Refresh Token, | | 1559 | |>--(A)----- & Secret Type ------->| Authorization | 1560 | Client | | Server | 1561 | |<--(B)----- Access Token --------<| | 1562 | | & Optional Secret | | 1563 +--------+ +---------------+ 1565 Figure 9 1567 To refresh a token, the client constructs an HTTP "POST" request to 1568 the token endpoint and includes the following parameters in the HTTP 1569 request body using the "application/x-www-form-urlencoded" content 1570 type as defined by [W3C.REC-html40-19980424]: 1572 type 1573 REQUIRED. The parameter value MUST be set to "refresh". 1575 client_id 1576 REQUIRED. The client identifier as described in Section 3.4. 1578 client_secret 1579 REQUIRED if the client was issued a secret. The client secret. 1581 refresh_token 1582 REQUIRED. The refresh token associated with the access token 1583 to be refreshed. 1585 secret_type 1586 OPTIONAL. The access token secret type as described by 1587 Section 8.3. If omitted, the authorization server will issue a 1588 bearer token (an access token without a matching secret) as 1589 described by Section 8.2. 1591 For example, the client makes the following HTTPS request (line break 1592 are for display purposes only): 1594 POST /token HTTP/1.1 1595 Host: server.example.com 1596 Content-Type: application/x-www-form-urlencoded 1598 type=refresh_token&client_id=s6BhdRkqt3&client_secret=8eSEIpnqmM 1599 &refresh_token=n4E9O119d&secret_type=hmac-sha256 1601 verify the client credential, the validity of the refresh token, and 1602 that the resource owner's authorization is still valid. If the 1603 request is valid, the authorization server issues an access token 1604 response as described in Section 3.2.1.1. The authorization server 1605 MAY issue a new token. 1607 For example (line breaks are for display purposes only): 1609 HTTP/1.1 200 OK 1610 Content-Type: application/json 1611 Cache-Control: no-store 1613 {"access_token":"SlAV32hkKG","expires_in":3600} 1615 If the request is invalid, the authorization server returns an error 1616 response as described in Section 3.2.1.2 with one of the following 1617 error codes: 1619 o "incorrect_client_credentials" 1621 o "authorization_expired" 1623 o "unsupported_secret_type" 1625 For example: 1627 HTTP/1.1 400 Bad Request 1628 Content-Type: application/json 1629 Cache-Control: no-store 1631 {"error":"incorrect_client_credentials"} 1633 8. Accessing a Protected Resource 1635 Clients access protected resources by presenting an access token to 1636 the resource server. The methods used by the resource server to 1637 validate the access token are beyond the scope of this specification, 1638 but generally involve an interaction or coordination between the 1639 resource server and authorization server. 1641 The method in which a client uses an access token depends on the 1642 security properties of the access tokens. By default, access tokens 1643 are issued without a matching secret. Clients MAY request an access 1644 token with a matching secret by specifying the desired secret type 1645 using the "secret_type" token request parameter. 1647 When an access token does not include a matching secret, the access 1648 token acts as a bearer token, where the token string is a shared 1649 symmetric secret. This requires treating the access token with the 1650 same care as other secrets (e.g. user passwords). Access tokens 1651 SHOULD NOT be sent in the clear over an insecure channel. 1653 However, when it is necessary to transmit bearer tokens in the clear 1654 without a secure channel, authorization servers SHOULD issue access 1655 tokens with limited scope and lifetime to reduce the potential risk 1656 from a compromised access token. Clients SHOULD request and utilize 1657 an access token with a matching secret when making protected resource 1658 requests over an insecure channel (e.g. an HTTP request without using 1659 TLS/SSL). 1661 When an access token includes a matching secret, the secret is not 1662 included directly in the request but is used instead to generate a 1663 cryptographic signature of the request. The signature can only be 1664 generated and verified by entities with access to the secret. 1666 Clients SHOULD NOT make authenticated requests with an access token 1667 to unfamiliar resource servers, especially when using bearer tokens, 1668 regardless of the presence of a secure channel. 1670 8.1. The Authorization Request Header 1672 The "Authorization" request header field is used by clients to make 1673 both bearer token and cryptographic token requests. When making 1674 bearer token requests, the client uses the "token" attribute to 1675 include the access token in the request without any of the other 1676 attributes. Additional methods for making bearer token requests are 1677 described in Section 8.2. 1679 For example: 1681 GET /resource HTTP/1.1 1682 Host: server.example.com 1683 Authorization: Token token="vF9dft4qmT" 1685 When making a cryptographic token request (using an access token with 1686 a matching secret) the client uses the "token" attribute to include 1687 the access token in the request, and uses the "nonce", "timestamp", 1688 "algorithm", and "signature" attributes to apply the matching secret. 1690 For example: 1692 GET /resource HTTP/1.1 1693 Host: server.example.com 1694 Authorization: Token token="vF9dft4qmT", 1695 nonce="s8djwd", 1696 timestamp="137131200", 1697 algorithm="hmac-sha256", 1698 signature="wOJIO9A2W5mFwDgiDvZbTSMK/PY=" 1700 The "Authorization" header field uses the framework defined by 1701 [RFC2617] as follows: 1703 credentials = "Token" RWS token-response 1705 token-response = token-id 1706 [ CS nonce ] 1707 [ CS timestamp ] 1708 [ CS algorithm ] 1709 [ CS signature ] 1711 token-id = "token" "=" <"> token <"> 1712 timestamp = "timestamp" "=" <"> 1*DIGIT <"> 1713 nonce = "nonce" "=" <"> token <"> 1715 algorithm = "algorithm" "=" algorithm-name 1716 algorithm-name = "hmac-sha256" / 1717 token 1719 signature = "signature" "=" <"> token <"> 1721 8.2. Bearer Token Requests 1723 Clients make bearer token requests by including the access token 1724 using the HTTP "Authorization" request header with the "Token" 1725 authentication scheme as described in Section 8.1. The access token 1726 is included using the "token" parameter. 1728 For example, the client makes the following HTTPS request: 1730 GET /resource HTTP/1.1 1731 Host: server.example.com 1732 Authorization: Token token="vF9dft4qmT" 1734 The resource server MUST validate the access token and ensure it has 1735 not expired and that its scope covers the requested resource. If the 1736 token expired or is invalid, the resource server MUST reply with an 1737 HTTP 401 status code (Unauthorized) and include the HTTP 1738 "WWW-Authenticate" response header as described in Section 9.1. 1740 For example: 1742 HTTP/1.1 401 Unauthorized 1743 WWW-Authenticate: Token realm='Service', error='token_expired' 1745 Alternatively, the client MAY include the access token using the HTTP 1746 request URI in the query component as described in Section 8.2.1, or 1747 in the HTTP body when using the "application/x-www-form-urlencoded" 1748 content type as described in Section 8.2.2. Clients SHOULD only use 1749 the request URI or body when the "Authorization" request header is 1750 not available, and MUST NOT use more than one method in each request. 1752 8.2.1. URI Query Parameter 1754 When including the access token in the HTTP request URI, the client 1755 adds the access token to the request URI query component as defined 1756 by [RFC3986] using the "oauth_token" parameter. 1758 For example, the client makes the following HTTPS request: 1760 GET /resource?oauth_token=vF9dft4qmT HTTP/1.1 1761 Host: server.example.com 1763 The HTTP request URI query can include other request-specific 1764 parameters, in which case, the "oauth_token" parameters SHOULD be 1765 appended following the request-specific parameters, properly 1766 separated by an "&" character (ASCII code 38). 1768 The resource server MUST validate the access token and ensure it has 1769 not expired and its scope includes the requested resource. If the 1770 resource expired or is not valid, the resource server MUST reply with 1771 an HTTP 401 status code (Unauthorized) and include the HTTP 1772 "WWW-Authenticate" response header as described in Section 9.1. 1774 8.2.2. Form-Encoded Body Parameter 1776 When including the access token in the HTTP request entity-body, the 1777 client adds the access token to the request body using the 1778 "oauth_token" parameter. The client can use this method only if the 1779 following REQUIRED conditions are met: 1781 o The entity-body is single-part. 1783 o The entity-body follows the encoding requirements of the 1784 "application/x-www-form-urlencoded" content-type as defined by 1785 [W3C.REC-html40-19980424]. 1787 o The HTTP request entity-header includes the "Content-Type" header 1788 field set to "application/x-www-form-urlencoded". 1790 o The HTTP request method is "POST", "PUT", or "DELETE". 1792 The entity-body can include other request-specific parameters, in 1793 which case, the "oauth_token" parameters SHOULD be appended following 1794 the request-specific parameters, properly separated by an "&" 1795 character (ASCII code 38). 1797 For example, the client makes the following HTTPS request: 1799 POST /resource HTTP/1.1 1800 Host: server.example.com 1801 Content-Type: application/x-www-form-urlencoded 1803 oauth_token=vF9dft4qmT 1805 The resource server MUST validate the access token and ensure it has 1806 not expired and its scope includes the requested resource. If the 1807 resource expired or is not valid, the resource server MUST reply with 1808 an HTTP 401 status code (Unauthorized) and include the HTTP 1809 "WWW-Authenticate" response header as described in Section 9.1. 1811 8.3. Cryptographic Tokens Requests 1813 Clients make authenticated protected resource requests using an 1814 access token with a matching secret by calculating a set of values 1815 and including them in the request using the "Authorization" header 1816 field. The way clients calculate these values depends on the access 1817 token secret type as issued by the authorization server. 1819 This specification defines the "hmac-sha256" algorithm, and 1820 establishes a registry for providing additional algorithms. Clients 1821 obtain an access token with a matching "hmac-sha256" secret by using 1822 the "secret_type" parameter when requesting an access token. 1824 8.3.1. The 'hmac-sha256' Algorithm 1826 The "hmac-sha256" algorithm uses the HMAC method as defined in 1827 [RFC2104] together with the SHA-256 hash function defined in [NIST 1828 FIPS-180-3] to apply the access token secret to the request and 1829 generate a signature value that is included in the request instead of 1830 transmitting the secret in the clear. 1832 To use the "hmac-sha256" algorithm, clients: 1834 1. Calculate the request timestamp and generate a request nonce as 1835 described in Section 8.3.1.1. 1837 2. Construct the normalized request string as described in 1838 Section 8.3.1.2. 1840 3. Calculate the request signature as described in Section 8.3.1.3. 1842 4. Include the timestamp, nonce, algorithm name, and calculated 1843 signature in the request using the "Authorization" header field. 1845 For example: 1847 GET /resource HTTP/1.1 1848 Host: server.example.com 1849 Authorization: Token token="vF9dft4qmT", 1850 nonce="s8djwd", 1851 timestamp="137131200", 1852 algorithm="hmac-sha256", 1853 signature="wOJIO9A2W5mFwDgiDvZbTSMK/PY=" 1855 The resource server MUST validate the access token and ensure it has 1856 not expired and that its scope covers the requested resource. The 1857 resource server MUST also recalculate the request signature using the 1858 attributes provided by the client and compare it to the signature 1859 provided. If the token expired or is invalid, or if the signature is 1860 incorrect, the resource server MUST reply with an HTTP 401 status 1861 code (Unauthorized) and include the HTTP "WWW-Authenticate" response 1862 header as described in Section 9.1. 1864 For example: 1866 HTTP/1.1 401 Unauthorized 1867 Date: Tue, 15 Nov 2010 08:12:31 GMT 1868 WWW-Authenticate: Token realm='Service', 1869 algorithms='hmac-sha256', 1870 error='invalid_signature' 1872 [[ Errors list ]] 1874 8.3.1.1. Nonce and Timestamp 1876 A timestamp in combination with unique nonce values is used to 1877 protect against replay attacks when transmitted over an insecure 1878 channel. 1880 The nonce is a random string, uniquely generated by the client to 1881 allow the resource server to verify that a request has never been 1882 made before and helps prevent replay attacks when requests are made 1883 over a non-secure channel. The nonce value MUST be unique across all 1884 requests with the same timestamp and token combinations. 1886 The timestamp value is the current time expressed in the number of 1887 seconds since January 1, 1970 00:00:00 GMT, and MUST be a positive 1888 integer. 1890 To avoid the need to retain an infinite number of nonce values for 1891 future checks, resource servers MAY choose to restrict the time 1892 period after which a request with an old timestamp is rejected. When 1893 resource servers apply such a restriction, clients SHOULD synchronize 1894 their clocks by using the resource server's time as indicated by the 1895 HTTP "Date" response header field as defined in [RFC2616]. 1897 8.3.1.2. Normalized String Construction 1899 The normalized request string is a consistent, reproducible 1900 concatenation of several of the HTTP request elements into a single 1901 string. The string is used as an input to the selected cryptographic 1902 method and includes the HTTP request method (e.g. "GET", "POST", 1903 etc.), the authority as declared by the HTTP "Host" request header, 1904 and the request resource URI. 1906 The normalized request string does not cover the entire HTTP request. 1907 Most notably, it does not include the entity-body or most HTTP 1908 entity-headers. It is important to note that the resource server 1909 cannot verify the authenticity of the excluded request elements 1910 without using additional protections such as TLS/SSL. 1912 The normalized request string is constructed by concatenating 1913 together, in order, the following HTTP request elements, separated by 1914 the "," character (ASCII code 44): 1916 1. The request timestamp as described in Section 8.3.1.1. 1918 2. The request nonce as described in Section 8.3.1.1. 1920 3. The cryptographic algorithm used. 1922 4. The HTTP request method in uppercase. For example: "HEAD", 1923 "GET", "POST", etc. 1925 5. The hostname, colon-separated (ASCII code 58) from the TCP port 1926 used to make the request as included in the HTTP request "Host" 1927 header field. The port MUST be included even if it is not 1928 included in the "Host" header field (i.e. the default port for 1929 the scheme). 1931 6. The request resource URI. 1933 For example, the normalized request string for the "GET" request URI 1934 "http://example.com/resource", request timestamp "137131200", request 1935 nonce "s8djwd", and "hmac-sha256" algorithm (line breaks are for 1936 display purposes only): 1938 137131200,s8djwd,hmac-sha256,GET,example.com:80, 1939 http://example.com/resource 1941 8.3.1.3. Signature Calculation 1943 Clients calculate the request signature using the HMAC-SHA256 1944 function: 1946 digest = HMAC-SHA256 (key, text) 1948 by setting the function variables are follows: 1950 text 1951 is set to the value of the normalize request string as 1952 described in Section 8.3.1.2. 1954 key 1955 is set to the access token secret. 1957 The request signature is the calculated value of the "digest" 1958 variable after the result octet string is base64-encoded per 1959 [RFC2045] section 6.8. 1961 9. Identifying a Protected Resource 1963 Clients access protected resources after locating the appropriate 1964 authorization and token endpoints and obtaining an access token. In 1965 many cases, interacting with a protected resource requires prior 1966 knowledge of the protected resource properties and methods, as well 1967 as its authentication requirements (i.e. establishing client 1968 identity, locating the authorization and token endpoints). 1970 However, there are cases in which clients are unfamiliar with the 1971 protected resource, including whether the resource requires 1972 authentication. When clients attempt to access an unfamiliar 1973 protected resource without an access token, the resource server 1974 denies the request and informs the client of the required credentials 1975 using an HTTP authentication challenge. 1977 In addition, when receiving an invalid authenticated request, the 1978 resource server issues an authentication challenge including the 1979 error type and message. 1981 9.1. The WWW-Authenticate Response Header 1983 A resource server receiving a request for a protected resource 1984 without a valid access token MUST respond with a 401 HTTP status code 1985 (Unauthorized), and includes at least one "Token" "WWW-Authenticate" 1986 response header field challenge. 1988 The "WWW-Authenticate" header field uses the framework defined by 1989 [RFC2617] as follows: 1991 challenge = "Token" RWS token-challenge 1993 token-challenge = realm 1994 [ CS authz-uri ] 1995 [ CS token-uri ] 1996 [ CS algorithms ] 1997 [ CS error ] 1999 authz-uri = "auth-uri" "=" URI-Reference 2000 token-uri = "token-uri" "=" URI-Reference 2001 algorithms = "algorithms" "=" <"> 1#algorithm-name <"> 2002 error = "error" "=" <"> token <"> 2004 CS = OWS "," OWS 2006 9.1.1. The 'realm' Attribute 2008 The "realm" attribute is used to provide the protected resources 2009 partition as defined by [RFC2617]. 2011 9.1.2. The 'authorization-uri' Attribute 2013 9.1.3. The 'algorithms' Attribute 2014 9.1.4. The 'error' Attribute 2016 10. Security Considerations 2018 [[ Todo ]] 2020 11. IANA Considerations 2022 [[ Not Yet ]] 2024 12. Acknowledgements 2026 [[ Add OAuth 1.0a authors + WG contributors ]] 2028 Appendix A. Differences from OAuth 1.0a 2030 [[ Todo ]] 2032 Appendix B. Document History 2034 [[ to be removed by RFC editor before publication as an RFC ]] 2036 -03 2038 o Fixed typo in JSON error examples. 2040 o Fixed general typos. 2042 o Moved all flows sections up one level. 2044 -02 2046 o Removed restriction on "redirect_uri" including a query. 2048 o Added "scope" parameter. 2050 o Initial proposal for a JSON-based token response format. 2052 -01 2054 o Editorial changes based on feedback from Brian Eaton, Bill Keenan, 2055 and Chuck Mortimore. 2057 o Changed devide flow "type" parameter values and switch to use only 2058 the token endpoint. 2060 -00 2062 o Initial draft based on a combination of WRAP and OAuth 1.0a. 2064 13. References 2066 13.1. Normative References 2068 [I-D.ietf-httpbis-p1-messaging] 2069 Fielding, R., Gettys, J., Mogul, J., Nielsen, H., 2070 Masinter, L., Leach, P., Berners-Lee, T., and J. Reschke, 2071 "HTTP/1.1, part 1: URIs, Connections, and Message 2072 Parsing", draft-ietf-httpbis-p1-messaging-09 (work in 2073 progress), March 2010. 2075 [NIST FIPS-180-3] 2076 National Institute of Standards and Technology, "Secure 2077 Hash Standard (SHS). FIPS PUB 180-3, October 2008". 2079 [RFC2045] Freed, N. and N. Borenstein, "Multipurpose Internet Mail 2080 Extensions (MIME) Part One: Format of Internet Message 2081 Bodies", RFC 2045, November 1996. 2083 [RFC2104] Krawczyk, H., Bellare, M., and R. Canetti, "HMAC: Keyed- 2084 Hashing for Message Authentication", RFC 2104, 2085 February 1997. 2087 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 2088 Requirement Levels", BCP 14, RFC 2119, March 1997. 2090 [RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., 2091 Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext 2092 Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999. 2094 [RFC2617] Franks, J., Hallam-Baker, P., Hostetler, J., Lawrence, S., 2095 Leach, P., Luotonen, A., and L. Stewart, "HTTP 2096 Authentication: Basic and Digest Access Authentication", 2097 RFC 2617, June 1999. 2099 [RFC2818] Rescorla, E., "HTTP Over TLS", RFC 2818, May 2000. 2101 [RFC3447] Jonsson, J. and B. Kaliski, "Public-Key Cryptography 2102 Standards (PKCS) #1: RSA Cryptography Specifications 2103 Version 2.1", RFC 3447, February 2003. 2105 [RFC3629] Yergeau, F., "UTF-8, a transformation format of ISO 2106 10646", STD 63, RFC 3629, November 2003. 2108 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 2109 Resource Identifier (URI): Generic Syntax", STD 66, 2110 RFC 3986, January 2005. 2112 [RFC4627] Crockford, D., "The application/json Media Type for 2113 JavaScript Object Notation (JSON)", RFC 4627, July 2006. 2115 [W3C.REC-html40-19980424] 2116 Hors, A., Raggett, D., and I. Jacobs, "HTML 4.0 2117 Specification", World Wide Web Consortium 2118 Recommendation REC-html40-19980424, April 1998, 2119 . 2121 13.2. Informative References 2123 [I-D.hammer-oauth] 2124 Hammer-Lahav, E., "The OAuth 1.0 Protocol", 2125 draft-hammer-oauth-10 (work in progress), February 2010. 2127 [I-D.hardt-oauth] 2128 Hardt, D., Tom, A., Eaton, B., and Y. Goland, "OAuth Web 2129 Resource Authorization Profiles", draft-hardt-oauth-01 2130 (work in progress), January 2010. 2132 [OASIS.saml-core-2.0-os] 2133 Cantor, S., Kemp, J., Philpott, R., and E. Maler, 2134 "Assertions and Protocol for the OASIS Security Assertion 2135 Markup Language (SAML) V2.0", OASIS Standard saml-core- 2136 2.0-os, March 2005. 2138 Authors' Addresses 2140 Eran Hammer-Lahav (editor) 2141 Yahoo! 2143 Email: eran@hueniverse.com 2144 URI: http://hueniverse.com 2145 David Recordon 2146 Facebook 2148 Email: davidrecordon@facebook.com 2149 URI: http://www.davidrecordon.com/ 2151 Dick Hardt 2153 Email: dick.hardt@gmail.com 2154 URI: http://dickhardt.org/