idnits 2.17.1 draft-ietf-oauth-v2-06.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 (June 9, 2010) is 5069 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 2131, but no explicit reference was found in the text == Unused Reference: 'RFC2045' is defined on line 2135, but no explicit reference was found in the text == Unused Reference: 'RFC2104' is defined on line 2139, but no explicit reference was found in the text == Unused Reference: 'RFC3447' is defined on line 2160, but no explicit reference was found in the text == Unused Reference: 'RFC3629' is defined on line 2164, but no explicit reference was found in the text == Unused Reference: 'I-D.hammer-oauth' is defined on line 2185, but no explicit reference was found in the text == Unused Reference: 'I-D.hardt-oauth' is defined on line 2189, 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 3023 (Obsoleted by RFC 7303) ** Obsolete normative reference: RFC 3447 (Obsoleted by RFC 8017) ** Obsolete normative reference: RFC 4627 (Obsoleted by RFC 7158, RFC 7159) ** Obsolete normative reference: RFC 5246 (Obsoleted by RFC 8446) Summary: 8 errors (**), 0 flaws (~~), 10 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: December 11, 2010 Facebook 6 D. Hardt 7 Microsoft 8 June 9, 2010 10 The OAuth 2.0 Protocol 11 draft-ietf-oauth-v2-06 13 Abstract 15 This specification describes the OAuth 2.0 protocol. OAuth provides 16 a method for making authenticated HTTP requests using a token - an 17 string used to denote an access grant with specific scope, duration, 18 and other attributes. Tokens are issued to third-party clients by an 19 authorization server with the approval of the resource owner. OAuth 20 defines multiple flows for obtaining a token to support a wide range 21 of client types and user experience. 23 Status of this Memo 25 This Internet-Draft is submitted in full conformance with the 26 provisions of BCP 78 and BCP 79. 28 Internet-Drafts are working documents of the Internet Engineering 29 Task Force (IETF). Note that other groups may also distribute 30 working documents as Internet-Drafts. The list of current Internet- 31 Drafts is at http://datatracker.ietf.org/drafts/current/. 33 Internet-Drafts are draft documents valid for a maximum of six months 34 and may be updated, replaced, or obsoleted by other documents at any 35 time. It is inappropriate to use Internet-Drafts as reference 36 material or to cite them other than as "work in progress." 38 This Internet-Draft will expire on December 11, 2010. 40 Copyright Notice 42 Copyright (c) 2010 IETF Trust and the persons identified as the 43 document authors. All rights reserved. 45 This document is subject to BCP 78 and the IETF Trust's Legal 46 Provisions Relating to IETF Documents 47 (http://trustee.ietf.org/license-info) in effect on the date of 48 publication of this document. Please review these documents 49 carefully, as they describe your rights and restrictions with respect 50 to this document. Code Components extracted from this document must 51 include Simplified BSD License text as described in Section 4.e of 52 the Trust Legal Provisions and are provided without warranty as 53 described in the Simplified BSD License. 55 Table of Contents 57 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4 58 1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 4 59 1.2. Overview . . . . . . . . . . . . . . . . . . . . . . . . . 6 60 1.3. Example . . . . . . . . . . . . . . . . . . . . . . . . . 8 61 1.4. Notational Conventions . . . . . . . . . . . . . . . . . . 8 62 2. Obtaining an Access Token . . . . . . . . . . . . . . . . . . 8 63 2.1. Client Credentials . . . . . . . . . . . . . . . . . . . . 9 64 2.2. End-User Endpoint . . . . . . . . . . . . . . . . . . . . 9 65 2.3. Token Endpoint . . . . . . . . . . . . . . . . . . . . . . 10 66 2.3.1. Client Authentication . . . . . . . . . . . . . . . . 10 67 2.3.2. Response Format . . . . . . . . . . . . . . . . . . . 11 68 2.4. Flow Parameters . . . . . . . . . . . . . . . . . . . . . 14 69 2.5. Web Server Flow . . . . . . . . . . . . . . . . . . . . . 14 70 2.5.1. Client Requests Authorization . . . . . . . . . . . . 16 71 2.5.2. Client Requests Access Token . . . . . . . . . . . . . 18 72 2.6. User-Agent Flow . . . . . . . . . . . . . . . . . . . . . 20 73 2.6.1. Client Requests Authorization . . . . . . . . . . . . 22 74 2.6.2. Client Extracts Access Token . . . . . . . . . . . . . 25 75 2.7. Device Flow . . . . . . . . . . . . . . . . . . . . . . . 25 76 2.7.1. Client Requests Authorization . . . . . . . . . . . . 27 77 2.7.2. Client Requests Access Token . . . . . . . . . . . . . 29 78 2.8. Username and Password Flow . . . . . . . . . . . . . . . . 31 79 2.8.1. Client Requests Access Token . . . . . . . . . . . . . 32 80 2.9. Client Credentials Flow . . . . . . . . . . . . . . . . . 34 81 2.9.1. Client Requests Access Token . . . . . . . . . . . . . 35 82 2.10. Assertion Flow . . . . . . . . . . . . . . . . . . . . . . 36 83 2.10.1. Client Requests Access Token . . . . . . . . . . . . . 37 84 2.11. Native Application Considerations . . . . . . . . . . . . 39 85 3. Refreshing an Access Token . . . . . . . . . . . . . . . . . . 40 86 4. Accessing a Protected Resource . . . . . . . . . . . . . . . . 42 87 4.1. The Authorization Request Header . . . . . . . . . . . . . 43 88 4.2. URI Query Parameter . . . . . . . . . . . . . . . . . . . 44 89 4.3. Form-Encoded Body Parameter . . . . . . . . . . . . . . . 44 90 5. Identifying a Protected Resource . . . . . . . . . . . . . . . 45 91 5.1. The WWW-Authenticate Response Header . . . . . . . . . . . 45 92 6. Security Considerations . . . . . . . . . . . . . . . . . . . 46 93 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 46 94 Appendix A. Contributors . . . . . . . . . . . . . . . . . . . . 46 95 Appendix B. Acknowledgements . . . . . . . . . . . . . . . . . . 47 96 Appendix C. Differences from OAuth 1.0a . . . . . . . . . . . . . 47 97 Appendix D. Document History . . . . . . . . . . . . . . . . . . 47 98 8. References . . . . . . . . . . . . . . . . . . . . . . . . . . 49 99 8.1. Normative References . . . . . . . . . . . . . . . . . . . 49 100 8.2. Informative References . . . . . . . . . . . . . . . . . . 50 101 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 51 103 1. Introduction 105 With the increasing use of distributed web services and cloud 106 computing, third-party applications require access to server-hosted 107 resources. These resources are usually protected and require 108 authentication using the resource owner's credentials (typically a 109 username and password). In the traditional client-server 110 authentication model, a client accessing a protected resource on a 111 server presents the resource owner's credentials in order to 112 authenticate and gain access. 114 Resource owners should not be required to share their credentials 115 when granting third-party applications access to their protected 116 resources. They should also have the ability to restrict access to a 117 limited subset of the resources they control, to limit access 118 duration, or to limit access to the HTTP methods supported by these 119 resources. 121 OAuth provides a method for making authenticated HTTP requests using 122 a token - an identifier used to denote an access grant with specific 123 scope, duration, and other attributes. Tokens are issued to third- 124 party clients by an authorization server with the approval of the 125 resource owner. Instead of sharing their credentials with the 126 client, resource owners grant access by authenticating directly with 127 the authorization server which in turn issues a token to the client. 128 The client uses the token to authenticate with the resource server 129 and gain access. 131 For example, a web user (resource owner) can grant a printing service 132 (client) access to her protected photos stored at a photo sharing 133 service (resource server), without sharing her username and password 134 with the printing service. Instead, she authenticates directly with 135 the photo sharing service (authorization server) which issues the 136 printing service delegation-specific credentials (token). 138 This specification defines the use of OAuth over HTTP [RFC2616] (or 139 HTTP over TLS as defined by [RFC2818]). Other specifications may 140 extend it for use with other transport protocols. 142 1.1. Terminology 144 resource server 145 An HTTP [RFC2616] server capable of accepting authenticated 146 resource requests using the OAuth protocol. 148 protected resource 149 An access-restricted resource which can be obtained from a 150 resource server using an OAuth-authenticated request. 152 client 153 An HTTP client capable of making authenticated requests for 154 protected resources using the OAuth protocol. 156 resource owner 157 An entity capable of granting access to a protected resource. 159 end-user 160 A human resource owner. 162 token 163 A string representing an access grant issued to the client. 164 The string is usually opaque to the client and can self-contain 165 the authorization information in a verifiable manner (i.e. 166 signed), or denotes an identifier used to retrieve the 167 authorization information. 169 access token 170 A token used by the client to make authenticated requests on 171 behalf of the resource owner. 173 refresh token 174 A token used by the client to replace an expired access token 175 with a new access token without having to involve the resource 176 owner. A refresh token is used when the access token is valid 177 for a shorter time period than the duration of the access grant 178 approved by the resource owner. 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 end-user endpoint 187 The authorization server's HTTP endpoint capable of 188 authenticating the end-user 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 1.2. Overview 201 Clients interact with a protected resource, first by requesting 202 access (which is granted in the form of an access token) from the 203 authorization server, and then by authenticating with the resource 204 server by presenting the access token. Figure 1 demonstrates the 205 flow between the client and authorization server (A, B), and the flow 206 between the client and resource server (C, D), when the client is 207 acting autonomously (the client is also the resource owner). 209 +--------+ +---------------+ 210 | |--(A)------ Credentials --------->| Authorization | 211 | | | Server | 212 | |<-(B)------ Access Token ---------| | 213 | | (w/ Optional Refresh Token) +---------------+ 214 | Client | 215 | | HTTP Request +---------------+ 216 | |--(C)--- with Access Token ------>| Resource | 217 | | | Server | 218 | |<-(D)------ HTTP Response --------| | 219 +--------+ +---------------+ 221 Figure 1: Generic Client-Server Flow 223 Access token strings can use any internal structure agreed upon 224 between the authorization server and the resource server, but their 225 structure is opaque to the client. Since the access token provides 226 the client access to the protected resource for the life of the 227 access token (or until revoked), the authorization server should 228 issue access tokens which expire within an appropriate time, usually 229 much shorter than the duration of the access grant. 231 When an access token expires, the client can request a new access 232 token from the authorization server by presenting its credentials 233 again (Figure 1), or by using the refresh token (if issued with the 234 access token) as shown in Figure 2. Once an expired access token has 235 been replaced with a new access token (A, B), the client uses the new 236 access token as before (C, D). 238 +--------+ +---------------+ 239 | |--(A)------ Refresh Token ------->| Authorization | 240 | | | Server | 241 | |<-(B)------ Access Token ---------| | 242 | | +---------------+ 243 | Client | 244 | | HTTP Request +---------------+ 245 | |--(C)--- with Access Token ------>| Resource | 246 | | | Server | 247 | |<-(D)----- HTTP Response ---------| | 248 +--------+ +---------------+ 250 Figure 2: Refreshing an Access Token 252 This specification defines a number of authorization flows to support 253 different client types and scenarios. These authorization flows can 254 be separated into three groups: user delegation flows, direct 255 credentials flows, and autonomous flows. 257 Additional authorization flows may be defined by other specifications 258 to cover different scenarios and client types. 260 User delegation flows are used to grant client access to protected 261 resources by the end-user without sharing the end-user credentials 262 (e.g. a username and password) with the client. Instead, the end- 263 user authenticates directly with the authorization server, and grants 264 client access to its protected resources. The user delegation flows 265 defined by this specifications are: 267 o Web Server Flow - This flow is optimized for clients that are part 268 of a web server application, accessible via HTTP requests. This 269 flow is described in Section 2.5. 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 2.6. 275 o Device Flow - This flow is suitable for clients executing on 276 limited devices, but where the end-user has separate access to a 277 user-agent on another computer or device. This flow is described 278 in Section 2.7. 280 Direct credentials flows enable clients to obtain an access token 281 with a single request using the client credentials or end-user 282 credentials without seeking additional resource owner authorization. 283 The direct credentials flows defined by this specification are: 285 o Username and Password Flow - This flow is used in cases where the 286 end-user trusts the client to handle its credentials but it is 287 still undesirable for the client to store the end-user's username 288 and password. This flow is only suitable when there is a high 289 degree of trust between the end-user and the client. This flow is 290 described in Section 2.8. 292 o Client Credentials Flow - The client uses its credentials to 293 obtain an access token. This flow is described in Section 2.9. 295 Autonomous flows enable clients to use utilize existing trust 296 relationships or different authorization constructs to obtain an 297 access token. They provide a bridge between OAuth and other trust 298 frameworks. The autonomous authorization flow defined by this 299 specifications is: 301 o Assertion Flow - The client presents an assertion such as a SAML 302 [OASIS.saml-core-2.0-os] assertion to the authorization server in 303 exchange for an access token. This flow is described in 304 Section 2.10. 306 1.3. Example 308 [[ Todo ]] 310 1.4. Notational Conventions 312 The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL NOT', 313 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'MAY', and 'OPTIONAL' in this 314 document are to be interpreted as described in [RFC2119]. 316 This document uses the Augmented Backus-Naur Form (ABNF) notation of 317 [I-D.ietf-httpbis-p1-messaging]. Additionally, the realm and auth- 318 param rules are included from [RFC2617], and the URI-Reference rule 319 from [RFC3986]. 321 2. Obtaining an Access Token 323 The client obtains an access token by using one of the authorization 324 flows supported by the authorization server. The authorization flows 325 all use the same authorization and token endpoints, each with a 326 different set of request parameters and values. 328 Access tokens have a scope, duration, and other access attributes 329 granted by the resource owner. These attributes MUST be enforced by 330 the resource server when receiving a protected resource request, and 331 by the authorization server when receiving a token refresh request. 333 In many cases it is desirable to issue access tokens with a shorter 334 lifetime than the duration of the authorization grant. However, it 335 may be undesirable to require the resource owner to authorize the 336 request again. Instead, the authorization server issues a refresh 337 token in addition to the access token. When the access token 338 expires, the client can request a new access token without involving 339 the resource owner as long as the authorization grant is still valid. 340 The token refresh method is described in Section 3. 342 2.1. Client Credentials 344 When requesting access from the authorization server, the client 345 identifies itself using a set of client credentials. The client 346 credentials include a client identifier and an OPTIONAL symmetric 347 shared secret. The means through which the client obtains these 348 credentials are beyond the scope of this specification, but usually 349 involve registration with the authorization server. 351 The client identifier is used by the authorization server to 352 establish the identity of the client for the purpose of presenting 353 information to the resource owner prior to granting access, as well 354 as for providing different service levels to different clients. They 355 can also be used to block unauthorized clients from requesting 356 access. 358 Due to the nature of some clients, authorization servers SHOULD NOT 359 make assumptions about the confidentiality of client credentials 360 without establishing trust with the client operator. Authorization 361 servers SHOULD NOT issue client secrets to clients incapable of 362 keeping their secrets confidential. 364 2.2. End-User Endpoint 366 In flows that involved an end-user, clients direct the end-user to 367 the end-user endpoint to approve their access request. When 368 accessing the end-user endpoint, the end-user first authenticates 369 with the authorization server, and then approves or denies the access 370 request. 372 The way in which the authorization server authenticates the end-user 373 (e.g. username and password login, OpenID, session cookies) and in 374 which the authorization server obtains the end-user's authorization, 375 including whether it uses a secure channel such as TLS, is beyond the 376 scope of this specification. However, the authorization server MUST 377 first verify the identity of the end-user. 379 The URI of the end-user endpoint can be found in the service 380 documentation, or can be obtained by using [[ OAuth Discovery ]]. 382 The end-user endpoint advertised by the resource server MAY include a 383 query component as defined by [RFC3986] section 3, which must be 384 retained when adding additional query parameters. 386 Since requests to the end-user endpoint result in user authentication 387 and the transmission of sensitive values, the authorization server 388 SHOULD require the use of a transport-layer mechanism such as TLS 389 when sending requests to the end-user endpoint. 391 2.3. Token Endpoint 393 After obtaining authorization from the resource owner, clients 394 request an access token from the authorization server's token 395 endpoint. 397 The URI of the token endpoint can be found in the service 398 documentation, or can be obtained by using [[ OAuth Discovery ]]. 400 The token endpoint advertised by the resource server MAY include a 401 query component as defined by [RFC3986] section 3. 403 Since requests to the token endpoint result in the transmission of 404 plain text credentials in the HTTP request and response, the 405 authorization server MUST require the use of a transport-layer 406 mechanism when sending requests to the token endpoints. Servers MUST 407 support TLS 1.2 as defined in [RFC5246] and MAY support addition 408 mechanisms with equivalent protections. 410 2.3.1. Client Authentication 412 The token endpoint requires the client to authenticate itself to the 413 authorization server. This is done by including the client 414 identifier (and optional secret) in the request. The client 415 identifier and secret are included in the request using two request 416 parameters: "client_id" and "client_secret". 418 For example (line breaks are for display purposes only): 420 POST /token HTTP/1.1 421 Host: server.example.com 422 Content-Type: application/x-www-form-urlencoded 424 type=web_server&client_id=s6BhdRkqt3& 425 client_secret=gX1fBat3bV&code=i1WsRn1uB1& 426 redirect_uri=https%3A%2F%2Fclient%2Eexample%2Ecom%2Fcb 428 The client MAY include the client credentials using an HTTP 429 authentication scheme which supports authenticating using a username 430 and password, instead of using the "client_id" and "client_secret" 431 request parameters. Including the client credentials using an HTTP 432 authentication scheme fulfills the requirements of including the 433 parameters as defined by the various flows. 435 The client MUST NOT include the client credentials using more than 436 one mechanism. If more than one mechanism is used, regardless if the 437 credentials are identical, the server MUST reply with an HTTP 400 438 status code (Bad Request) and include the "multiple-credentials" 439 error message. 441 The authorization server MUST accept the client credentials using 442 both the request parameters, and the HTTP Basic authentication scheme 443 as defined in [RFC2617]. The authorization server MAY support 444 additional HTTP authentication schemes. 446 For example (line breaks are for display purposes only): 448 POST /token HTTP/1.1 449 Host: server.example.com 450 Authorization: Basic czZCaGRSa3F0MzpnWDFmQmF0M2JW 451 Content-Type: application/x-www-form-urlencoded 453 type=web_server&code=i1WsRn1uB1& 454 redirect_uri=https%3A%2F%2Fclient%2Eexample%2Ecom%2Fcb 456 2.3.2. Response Format 458 Authorization servers respond to client requests by including a set 459 of response parameters in the entity body of the HTTP response. The 460 response uses one of three formats based on the format requested by 461 the client (using the "format" request parameter or the HTTP "Accept" 462 header field): 464 o The "application/json" media type as defined by [RFC4627]. The 465 parameters are serialized into a JSON structure by adding each 466 parameter at the highest structure level. Parameter names and 467 string values are included as JSON strings. Numerical values are 468 included as JSON numbers. 470 For example: 472 { 473 "access_token":"SlAV32hkKG", 474 "expires_in":3600, 475 "refresh_token":"8xLOxBtZp8" 476 } 478 o The "application/xml" media type as defined by [RFC3023]. The 479 parameters are serialized into an XML structure by adding each 480 parameter as a child element of the root "" element. [[ Add 481 namespace ]] 483 For example: 485 486 487 SlAV32hkKG 488 3600 489 8xLOxBtZp8 490 492 o The "application/x-www-form-urlencoded" media type as defined by 493 [W3C.REC-html401-19991224]. 495 For example (line breaks are for display purposes only): 497 access_token=SlAV32hkKG&expires_in=3600& 498 refresh_token=8xLOxBtZp8 500 The authorization server MUST include the HTTP "Cache-Control" 501 response header field with a value of "no-store" in any response 502 containing tokens, secrets, or other sensitive information. 504 2.3.2.1. Access Token Response 506 After receiving and verifying a valid and authorized access token 507 request from the client (as described in each of the flows below), 508 the authorization server constructs the response using the format 509 requested by the client, which includes the parameters listed below, 510 as well as additional flow-specific parameters. The formatted 511 parameters are sent to the client in the entity body of the HTTP 512 response with a 200 status code (OK). 514 The token response contains the following common parameters: 516 access_token 517 REQUIRED. The access token issued by the authorization server. 519 expires_in 520 OPTIONAL. The duration in seconds of the access token 521 lifetime. 523 refresh_token 524 OPTIONAL. The refresh token used to obtain new access tokens 525 using the same end-user access grant as described in Section 3. 527 scope 528 OPTIONAL. The scope of the access token as a list of space- 529 delimited strings. The value of the "scope" parameter is 530 defined by the authorization server. If the value contains 531 multiple space-delimited strings, their order does not matter, 532 and each string adds an additional access range to the 533 requested scope. 535 For example: 537 HTTP/1.1 200 OK 538 Content-Type: application/json 539 Cache-Control: no-store 541 { 542 "access_token":"SlAV32hkKG", 543 "expires_in":3600, 544 "refresh_token":"8xLOxBtZp8" 545 } 547 2.3.2.2. Error Response 549 If the token request is invalid or unauthorized, the authorization 550 server constructs the response using the format requested by the 551 client which includes the parameters listed below, as well as 552 additional flow-specific parameters. The formatted parameters are 553 sent to the client in the entity body of the HTTP response with a 400 554 status code (Bad Request). 556 The response contains the following common parameter: 558 error 559 REQUIRED. The parameter value MUST be set to one of the values 560 specified by each flow. 562 For example: 564 HTTP/1.1 400 Bad Request 565 Content-Type: application/json 566 Cache-Control: no-store 568 { 569 "error":"incorrect_client_credentials" 570 } 572 2.4. Flow Parameters 574 The sizes of tokens and other values received from the authorization 575 server, are left undefined by this specification. Clients should 576 avoid making assumptions about value sizes. Servers should document 577 the expected size of any value they issue. 579 Unless otherwise noted, all the protocol parameter names and values 580 are case sensitive. 582 2.5. Web Server Flow 584 The web server flow is a user delegation flow suitable for clients 585 capable of interacting with the end-user's user-agent (typically a 586 web browser) and capable of receiving incoming requests from the 587 authorization server (capable of acting as an HTTP server). 589 +----------+ Client Identifier +---------------+ 590 | -+----(A)-- & Redirect URI ------->| | 591 | End-user | | Authorization | 592 | at |<---(B)-- User authenticates --->| Server | 593 | Browser | | | 594 | -+----(C)-- Verification Code ----<| | 595 +-|----|---+ +---------------+ 596 | | ^ v 597 (A) (C) | | 598 | | | | 599 ^ v | | 600 +---------+ | | 601 | |>---(D)-- Client Credentials, --------' | 602 | Web | Verification Code, | 603 | Client | & Redirect URI | 604 | | | 605 | |<---(E)------- Access Token -----------------' 606 +---------+ (w/ Optional Refresh Token) 608 Figure 3: Web Server Flow 610 The web server flow illustrated in Figure 3 includes the following 611 steps: 613 (A) The web client initiates the flow by redirecting the end-user's 614 user-agent to the end-user endpoint with its client identifier 615 and a redirect URI to which the authorization server will send 616 the end-user back once authorization is received (or denied). 618 (B) The authorization server authenticates the end-user (via the 619 user-agent) and establishes whether the end-user grants or 620 denies the client's access request. 622 (C) Assuming the end-user granted access, the authorization server 623 redirects the user-agent back to the client to the redirection 624 URI provided earlier. The authorization includes a verification 625 code for the client to use to obtain an access token. 627 (D) The client requests an access token from the authorization 628 server by including its client credentials (identifier and 629 secret), as well as the verification code received in the 630 previous step. 632 (E) The authorization server validates the client credentials and 633 the verification code and responds back with the access token. 635 2.5.1. Client Requests Authorization 637 In order for the end-user to grant the client access, the client 638 sends the end-user to the authorization server. The client 639 constructs the request URI by adding the following URI query 640 parameters to the end-user endpoint URI: 642 type 643 REQUIRED. The parameter value MUST be set to "web_server". 645 client_id 646 REQUIRED. The client identifier as described in Section 2.1. 648 redirect_uri 649 REQUIRED unless a redirection URI has been established between 650 the client and authorization server via other means. An 651 absolute URI to which the authorization server will redirect 652 the user-agent to when the end-user authorization step is 653 completed. The authorization server MAY require the client to 654 pre-register their redirection URI. Authorization servers MAY 655 restrict the redirection URI to not include a query component 656 as defined by [RFC3986] section 3. 658 state 659 OPTIONAL. An opaque value used by the client to maintain state 660 between the request and callback. The authorization server 661 includes this value when redirecting the user-agent back to the 662 client. 664 scope 665 OPTIONAL. The scope of the access request expressed as a list 666 of space-delimited strings. The value of the "scope" parameter 667 is defined by the authorization server. If the value contains 668 multiple space-delimited strings, their order does not matter, 669 and each string adds an additional access range to the 670 requested scope. 672 immediate 673 OPTIONAL. The parameter value must be set to "true" or 674 "false". If set to "true", the authorization server MUST NOT 675 prompt the end-user to authenticate or approve access. 676 Instead, the authorization server attempts to establish the 677 end-user's identity via other means (e.g. browser cookies) and 678 checks if the end-user has previously approved an identical 679 access request by the same client and if that access grant is 680 still active. If the authorization server does not support an 681 immediate check or if it is unable to establish the end-user's 682 identity or approval status, it MUST deny the request without 683 prompting the end-user. Defaults to "false" if omitted. 685 The client directs the end-user to the constructed URI using an HTTP 686 redirection response, or by other means available to it via the end- 687 user's user-agent. The request MUST use the HTTP "GET" method. 689 For example, the client directs the end-user's user-agent to make the 690 following HTTPS requests (line breaks are for display purposes only): 692 GET /authorize?type=web_server&client_id=s6BhdRkqt3&redirect_uri= 693 https%3A%2F%2Fclient%2Eexample%2Ecom%2Fcb HTTP/1.1 694 Host: server.example.com 696 If the client has previously registered a redirection URI with the 697 authorization server, the authorization server MUST verify that the 698 redirection URI received matches the registered URI associated with 699 the client identifier. 701 The authorization server authenticates the end-user and obtains an 702 authorization decision (by asking the end-user or establishing 703 approval via other means). The authorization server sends the end- 704 user's user-agent to the provided client redirection URI using an 705 HTTP redirection response, or by other means available to it via the 706 end-user's user-agent. 708 2.5.1.1. End-user Grants Authorization 710 If the end-user authorizes the access request, the authorization 711 server generates a verification code and associates it with the 712 client identifier and redirection URI. The authorization server 713 constructs the request URI by adding the following parameters to the 714 query component of redirection URI provided by the client: 716 code 717 REQUIRED. The verification code generated by the authorization 718 server. 720 state 721 REQUIRED if the "state" parameter was present in the client 722 authorization request. Set to the exact value received from 723 the client. 725 The verification code should expire shortly after it is issued and 726 allowed for a single use. 728 For example, the authorization server redirects the end-user's user- 729 agent by sending the following HTTP response: 731 HTTP/1.1 302 Found 732 Location: https://client.example.com/cb?code=i1WsRn1uB1 734 In turn, the end-user's user-agent makes the following HTTPS "GET" 735 request: 737 GET /cb?code=i1WsRn1uB1 HTTP/1.1 738 Host: client.example.com 740 2.5.1.2. End-user Denies Authorization 742 If the end-user denied the access request, the authorization server 743 constructs the request URI by adding the following parameters to the 744 query component of the redirection URI provided by the client: 746 error 747 REQUIRED. The parameter value MUST be set to "user_denied". 749 state 750 REQUIRED if the "state" parameter was present in the client 751 authorization request. Set to the exact value received from 752 the client. 754 For example, the authorization server directs the client to make the 755 following HTTP request: 757 GET /cb?error=user_denied HTTP/1.1 758 Host: client.example.com 760 The authorization flow concludes unsuccessfully. 762 2.5.2. Client Requests Access Token 764 The client obtains an access token from the authorization server by 765 making an HTTP "POST" request to the token endpoint. The client 766 constructs a request URI by adding the following parameters to the 767 request: 769 type 770 REQUIRED. The parameter value MUST be set to "web_server". 772 client_id 773 REQUIRED. The client identifier as described in Section 2.1. 775 client_secret 776 REQUIRED if the client identifier has a matching secret. The 777 client secret as described in Section 2.1. 779 code 780 REQUIRED. The verification code received from the 781 authorization server. 783 redirect_uri 784 REQUIRED. The redirection URI used in the initial request. 786 format 787 OPTIONAL. The response format requested by the client. Value 788 MUST be one of "json", "xml", or "form". Alternatively, the 789 client MAY use the HTTP "Accept" header field with the desired 790 media type. Defaults to "json" if omitted and no "Accept" 791 header field is present. 793 For example, the client makes the following HTTPS request (line 794 breaks are for display purposes only): 796 POST /token HTTP/1.1 797 Host: server.example.com 798 Content-Type: application/x-www-form-urlencoded 800 type=web_server&client_id=s6BhdRkqt3& 801 client_secret=gX1fBat3bV&code=i1WsRn1uB1& 802 redirect_uri=https%3A%2F%2Fclient%2Eexample%2Ecom%2Fcb 804 The authorization server MUST verify that the verification code, 805 client identity, client secret, and redirection URI are all valid and 806 match its stored association. If the request is valid, the 807 authorization server issues a successful response as described in 808 Section 2.3.2.1. 810 For example: 812 HTTP/1.1 200 OK 813 Content-Type: application/json 814 Cache-Control: no-store 816 { 817 "access_token":"SlAV32hkKG", 818 "expires_in":3600, 819 "refresh_token":"8xLOxBtZp8" 820 } 822 If the request is invalid, the authorization server returns an error 823 response as described in Section 2.3.2.2 with one of the following 824 error codes: 826 o "redirect_uri_mismatch" 828 o "bad_verification_code" 830 o "incorrect_client_credentials" 832 For example: 834 HTTP/1.1 400 Bad Request 835 Content-Type: application/json 836 Cache-Control: no-store 838 { 839 "error":"incorrect_client_credentials" 840 } 842 2.6. User-Agent Flow 844 The user-agent flow is a user delegation flow suitable for client 845 applications residing in a user-agent, typically implemented in a 846 browser using a scripting language such as JavaScript. These clients 847 cannot keep client secrets confidential and the authentication of the 848 client is based on the user-agent's same-origin policy. 850 Unlike other flows in which the client makes separate authorization 851 and access token requests, the client received the access token as a 852 result of the authorization request in the form of an HTTP 853 redirection. The client requests the authorization server to 854 redirect the user-agent to another web server or local resource 855 accessible to the browser which is capable of extracting the access 856 token from the response and passing it to the client. 858 This user-agent flow does not utilize the client secret since the 859 client executables reside on the end-user's computer or device which 860 makes the client secret accessible and exploitable. Because the 861 access token is encoded into the redirection URI, it may be exposed 862 to the end-user and other applications residing on the computer or 863 device. 865 +----------+ Client Identifier +----------------+ 866 | |>---(A)-- & Redirection URI --->| | 867 | | | | 868 End <--+ - - - +----(B)-- User authenticates -->| Authorization | 869 User | | | Server | 870 | |<---(C)-- Redirect URI --------<| | 871 | Client | with Access Token | | 872 | in | (w/ Optional Refresh Token) +----------------+ 873 | Browser | in Fragment 874 | | +----------------+ 875 | |>---(D)-- Redirect URI -------->| | 876 | | without Fragment | Web Server | 877 | | | with Client | 878 | (F) |<---(E)-- Web Page with -------<| Resource | 879 | Access | Script | | 880 | Token | +----------------+ 881 +----------+ 883 Figure 4: User-Agent Flow 885 The user-agent flow illustrated in Figure 4 includes the following 886 steps: 888 (A) The client sends the user-agent to the authorization server and 889 includes its client identifier and redirection URI in the 890 request. 892 (B) The authorization server authenticates the end-user (via the 893 user-agent) and establishes whether the end-user grants or 894 denies the client's access request. 896 (C) Assuming the end-user granted access, the authorization server 897 redirects the user-agent to the redirection URI provided 898 earlier. The redirection URI includes the access token in the 899 URI fragment. 901 (D) The user-agent follows the redirection instructions by making a 902 request to the web server which does not include the fragment. 903 The user-agent retains the fragment information locally. 905 (E) The web server returns a web page containing a script capable of 906 extracting the access token from the URI fragment retained by 907 the user-agent. 909 (F) The user-agent executes the script provided by the web server 910 which extracts the access token and passes it to the client. 912 2.6.1. Client Requests Authorization 914 In order for the end-user to grant the client access, the client 915 sends the end-user to the authorization server. The client 916 constructs the request URI by adding the following URI query 917 parameters to the end-user endpoint URI: 919 type 920 REQUIRED. The parameter value MUST be set to "user_agent". 922 client_id 923 REQUIRED. The client identifier as described in Section 2.1. 925 redirect_uri 926 REQUIRED unless a redirection URI has been established between 927 the client and authorization server via other means. An 928 absolute URI to which the authorization server will redirect 929 the user-agent to when the end-user authorization step is 930 completed. The authorization server SHOULD require the client 931 to pre-register their redirection URI. Authorization servers 932 MAY restrict the redirection URI to not include a query 933 component as defined by [RFC3986] section 3. 935 state 936 OPTIONAL. An opaque value used by the client to maintain state 937 between the request and callback. The authorization server 938 includes this value when redirecting the user-agent back to the 939 client. 941 scope 942 OPTIONAL. The scope of the access request expressed as a list 943 of space-delimited strings. The value of the "scope" parameter 944 is defined by the authorization server. If the value contains 945 multiple space-delimited strings, their order does not matter, 946 and each string adds an additional access range to the 947 requested scope. 949 immediate 950 OPTIONAL. The parameter value must be set to "true" or 951 "false". If set to "true", the authorization server MUST NOT 952 prompt the end-user to authenticate or approve access. 953 Instead, the authorization server attempts to establish the 954 end-user's identity via other means (e.g. browser cookies) and 955 checks if the end-user has previously approved an identical 956 access request by the same client and if that access grant is 957 still active. If the authorization server does not support an 958 immediate check or if it is unable to establish the end-user's 959 identity or approval status, it MUST deny the request without 960 prompting the end-user. Defaults to "false" if omitted. 962 The client directs the end-user to the constructed URI using an HTTP 963 redirection response, or by other means available to it via the end- 964 user's user-agent. The request MUST use the HTTP "GET" method. 966 For example, the client directs the end-user's user-agent to make the 967 following HTTPS request (line breaks are for display purposes only): 969 GET /authorize?type=user_agent&client_id=s6BhdRkqt3& 970 redirect_uri=https%3A%2F%2FEexample%2Ecom%2Frd HTTP/1.1 971 Host: server.example.com 973 If the client has previously registered a redirection URI with the 974 authorization server, the authorization server MUST verify that the 975 redirection URI received matches the registered URI associated with 976 the client identifier. 978 The authorization server authenticates the end-user and obtains an 979 authorization decision (by asking the end-user or establishing 980 approval via other means). The authorization server sends the end- 981 user's user-agent to the provided client redirection URI using an 982 HTTP redirection response. 984 2.6.1.1. End-user Grants Authorization 986 If the end-user authorizes the access request, the authorization 987 server issues an access token and delivers it to the client by adding 988 the following parameters, using the 989 "application/x-www-form-urlencoded" format as defined by 990 [W3C.REC-html401-19991224], to the redirection URI fragment: 992 access_token 993 REQUIRED. The access token. 995 expires_in 996 OPTIONAL. The duration in seconds of the access token 997 lifetime. 999 refresh_token 1000 OPTIONAL. The refresh token. 1002 state 1003 REQUIRED if the "state" parameter was present in the client 1004 authorization request. Set to the exact value received from 1005 the client. 1007 For example, the authorization server redirects the end-user's user- 1008 agent by sending the following HTTP response: 1010 HTTP/1.1 302 Found 1011 Location: http://example.com/rd#access_token=FJQbwq9&expires_in=3600 1013 2.6.1.2. End-user Denies Authorization 1015 If the end-user denied the access request, the authorization server 1016 responds to the client by adding the following parameters, using the 1017 "application/x-www-form-urlencoded" format as defined by 1018 [W3C.REC-html401-19991224], to the redirection URI fragment: 1020 error 1021 REQUIRED. The parameter value MUST be set to "user_denied". 1023 state 1024 REQUIRED if the "state" parameter was present in the client 1025 authorization request. Set to the exact value received from 1026 the client. 1028 For example, the authorization server responds with the following: 1030 HTTP/1.1 302 Found 1031 Location: http://example.com/rd#error=user_denied 1033 The authorization flow concludes unsuccessfully. To extract the 1034 error message, the client follows the steps described in 1035 Section 2.6.2. 1037 2.6.2. Client Extracts Access Token 1039 The user-agent follows the authorization server redirection response 1040 by making an HTTP "GET" request to the URI received in the "Location" 1041 HTTP response header. The user-agent SHALL NOT include the fragment 1042 component with the request. 1044 For example, the user-agent makes the following HTTP "GET" request in 1045 response to the redirection directive received from the authorization 1046 server: 1048 GET /rd HTTP/1.1 1049 Host: example.com 1051 The HTTP response to the redirection request returns a web page 1052 (typically an HTML page with an embedded script) capable of accessing 1053 the full redirection URI including the fragment retained by the user- 1054 agent, and extracting the access token (and other parameters) 1055 contained in the fragment. 1057 2.7. Device Flow 1059 The device flow is a user delegation flow suitable for clients 1060 executing on devices which do not have an easy data-entry method 1061 (e.g. game consoles or media hub), but where the end-user has 1062 separate access to a user-agent on another computer or device (e.g. 1063 home computer, a laptop, or a smart phone). The client is incapable 1064 of receiving incoming requests from the authorization server 1065 (incapable of acting as an HTTP server). 1067 Instead of interacting with the end-user's user-agent, the client 1068 instructs the end-user to use another computer or device and connect 1069 to the authorization server to approve the access request. Since the 1070 client cannot receive incoming requests, it polls the authorization 1071 server repeatedly until the end-user completes the approval process. 1073 This device flow does not utilize the client secret since the client 1074 executables reside on a local device which makes the client secret 1075 accessible and exploitable. 1077 +----------+ +----------------+ 1078 | |>---(A)-- Client Identifier --->| | 1079 | | | | 1080 | |<---(B)-- Verification Code, --<| | 1081 | | User Code, | | 1082 | | & Verification URI | | 1083 | Device | | | 1084 | Client | Client Identifier & | | 1085 | |>---(E)-- Verification Code --->| | 1086 | | ... | | 1087 | |>---(E)---> | | 1088 | | | Authorization | 1089 | |<---(F)-- Access Token --------<| Server | 1090 +----------+ (w/ Optional Refresh Token) | | 1091 v | | 1092 : | | 1093 (C) User Code & Verification URI | | 1094 : | | 1095 v | | 1096 +----------+ | | 1097 | End-user | | | 1098 | at |<---(D)-- User authenticates -->| | 1099 | Browser | | | 1100 +----------+ +----------------+ 1102 Figure 5: Device Flow 1104 The device flow illustrated in Figure 5 includes the following steps: 1106 (A) The client requests access from the authorization server and 1107 includes its client identifier in the request. 1109 (B) The authorization server issues a verification code, an end-user 1110 code, and provides the end-user verification URI. 1112 (C) The client instructs the end-user to use its user-agent 1113 (elsewhere) and visit the provided end-user verification URI. 1114 The client provides the end-user with the end-user code to enter 1115 in order to grant access. 1117 (D) The authorization server authenticates the end-user (via the 1118 user-agent) and prompts the end-user to grant the client's 1119 access request. If the end-user agrees to the client's access 1120 request, the end-user enters the end-user code provided by the 1121 client. The authorization server validates the end-user code 1122 provided by the end-user. 1124 (E) While the end-user authorizes (or denies) the client's request 1125 (D), the client repeatedly polls the authorization server to 1126 find out if the end-user completed the end-user authorization 1127 step. The client includes the verification code and its client 1128 identifier. 1130 (F) Assuming the end-user granted access, the authorization server 1131 validates the verification code provided by the client and 1132 responds back with the access token. 1134 2.7.1. Client Requests Authorization 1136 The client initiates the flow by requesting a set of verification 1137 codes from the authorization server by making an HTTP "POST" request 1138 to the token endpoint. The client constructs a request URI by adding 1139 the following parameters to the request: 1141 type 1142 REQUIRED. The parameter value MUST be set to "device_code". 1144 client_id 1145 REQUIRED. The client identifier as described in Section 2.1. 1147 scope 1148 OPTIONAL. The scope of the access request expressed as a list 1149 of space-delimited strings. The value of the "scope" parameter 1150 is defined by the authorization server. If the value contains 1151 multiple space-delimited strings, their order does not matter, 1152 and each string adds an additional access range to the 1153 requested scope. 1155 format 1156 OPTIONAL. The response format requested by the client. Value 1157 MUST be one of "json", "xml", or "form". Alternatively, the 1158 client MAY use the HTTP "Accept" header field with the desired 1159 media type. Defaults to "json" if omitted and no "Accept" 1160 header field is present. 1162 For example, the client makes the following HTTPS request (line 1163 breaks are for display purposes only): 1165 POST /token HTTP/1.1 1166 Host: server.example.com 1167 Content-Type: application/x-www-form-urlencoded 1169 type=device_code&client_id=s6BhdRkqt3 1171 In response, the authorization server generates a verification code 1172 and an end-user code and includes them in the HTTP response body 1173 using the "application/json" format as described by Section 2.3.2 1174 with a 200 status code (OK). The response contains the following 1175 parameters: 1177 code 1178 REQUIRED. The verification code. 1180 user_code 1181 REQUIRED. The end-user code. 1183 verification_uri 1184 REQUIRED. The end-user verification URI on the authorization 1185 server. The URI should be short and easy to remember as end- 1186 users will be asked to manually type it into their user-agent. 1188 expires_in 1189 OPTIONAL. The duration in seconds of the verification code 1190 lifetime. 1192 interval 1193 OPTIONAL. The minimum amount of time in seconds that the 1194 client SHOULD wait between polling requests to the token 1195 endpoint. 1197 For example: 1199 HTTP/1.1 200 OK 1200 Content-Type: application/json 1201 Cache-Control: no-store 1203 { 1204 "code":"74tq5miHKB", 1205 "user_code":"94248", 1206 "verification_uri":"http://www.example.com/device", 1207 "interval"=5 1208 } 1210 The client displays the end-user code and the end-user verification 1211 URI to the end-user, and instructs the end-user to visit the URI 1212 using a user-agent and enter the end-user code. 1214 The end-user manually types the provided verification URI and 1215 authenticates with the authorization server. The authorization 1216 server prompts the end-user to authorize the client's request by 1217 entering the end-user code provided by the client. Once the end-user 1218 approves or denies the request, the authorization server informs the 1219 end-user to return to the device for further instructions. 1221 2.7.2. Client Requests Access Token 1223 Since the client is unable to receive incoming requests from the 1224 authorization server, it polls the authorization server repeatedly 1225 until the end-user grants or denies the request, or the verification 1226 code expires. 1228 The client makes the following request at an arbitrary but reasonable 1229 interval which MUST NOT exceed the minimum interval rate provided by 1230 the authorization server (if present via the "interval" parameter). 1231 Alternatively, the client MAY provide a user interface for the end- 1232 user to manually inform it when authorization was granted. 1234 The client requests an access token by making an HTTP "POST" request 1235 to the token endpoint. The client constructs a request URI by adding 1236 the following parameters to the request: 1238 type 1239 REQUIRED. The parameter value MUST be set to "device_token". 1241 client_id 1242 REQUIRED. The client identifier as described in Section 2.1. 1244 code 1245 REQUIRED. The verification code received from the 1246 authorization server. 1248 format 1249 OPTIONAL. The response format requested by the client. Value 1250 MUST be one of "json", "xml", or "form". Alternatively, the 1251 client MAY use the HTTP "Accept" header field with the desired 1252 media type. Defaults to "json" if omitted and no "Accept" 1253 header field is present. 1255 For example, the client makes the following HTTPS request (line 1256 breaks are for display purposes only): 1258 POST /token HTTP/1.1 1259 Host: server.example.com 1260 Content-Type: application/x-www-form-urlencoded 1262 type=device_token&client_id=s6BhdRkqt3 1263 &code=74tq5miHKB 1265 If the end-user authorized the request, the authorization server 1266 issues an access token response as described in Section 2.3.2.1. 1268 For example: 1270 HTTP/1.1 200 OK 1271 Content-Type: application/json 1272 Cache-Control: no-store 1274 { 1275 "access_token":"SlAV32hkKG", 1276 "expires_in":3600, 1277 "refresh_token":"8xLOxBtZp8" 1278 } 1280 If the request is invalid, the authorization server returns an error 1281 response as described in Section 2.3.2.2 with one of the following 1282 error codes: 1284 o "authorization_declined" 1286 o "bad_verification_code" 1288 For example: 1290 HTTP/1.1 400 Bad Request 1291 Content-Type: application/json 1292 Cache-Control: no-store 1294 { 1295 "error":"authorization_declined" 1296 } 1298 If the end-user authorization is pending or expired without receiving 1299 any response from the end-user, or the client is exceeding the 1300 allowed polling interval, the authorization server returns an error 1301 response as described in Section 2.3.2.2 with one of the following 1302 error codes: 1304 o "'authorization_pending" 1306 o "slow_down" 1307 o "code_expired" 1309 For example: 1311 HTTP/1.1 400 Bad Request 1312 Content-Type: application/json 1313 Cache-Control: no-store 1315 { 1316 "error":"authorization_pending" 1317 } 1319 2.8. Username and Password Flow 1321 The username and password flow is suitable for clients capable of 1322 asking end-users for their usernames and passwords. It is also used 1323 to migrate existing clients using direct authentication schemes such 1324 as HTTP Basic or Digest authentication to OAuth by converting the 1325 end-user credentials stored with tokens. 1327 However, unlike the HTTP Basic authentication scheme defined in 1328 [RFC2617], the end-user's credentials are used in a single request 1329 and are exchanged for an access token and refresh token which 1330 eliminates the client need to store them for future use. 1332 The methods through which the client prompts end users for their 1333 usernames and passwords is beyond the scope of this specification. 1334 The client MUST discard the usernames and passwords once an access 1335 token has been obtained. 1337 This flow is suitable in cases where the end-user already has a trust 1338 relationship with the client, such as its computer operating system 1339 or highly privileged applications. Authorization servers should take 1340 special care when enabling the username and password flow, and only 1341 when other delegation flows are not viable. 1343 End-user 1344 v 1345 : 1346 (A) 1347 : 1348 v 1349 +--------+ +---------------+ 1350 | | Client Credentials | | 1351 | |>--(B)--- & User Credentials ---->| Authorization | 1352 | Client | | Server | 1353 | |<--(C)---- Access Token ---------<| | 1354 | | (w/ Optional Refresh Token) | | 1355 +--------+ +---------------+ 1357 Figure 6: Username and Password Flow 1359 The username and password flow illustrated in Figure 6 includes the 1360 following steps: 1362 (A) The end-user provides the client with its username and password. 1364 (B) The client sends an access token request to the authorization 1365 server and includes its client identifier and client secret, and 1366 the end-user's username and password. 1368 (C) The authorization server validates the end-user credentials and 1369 the client credentials and issues an access token. 1371 2.8.1. Client Requests Access Token 1373 The client requests an access token by making an HTTP "POST" request 1374 to the token endpoint. The client constructs a request URI by adding 1375 the following parameters to the request: 1377 type 1378 REQUIRED. The parameter value MUST be set to "username". 1380 client_id 1381 REQUIRED. The client identifier as described in Section 2.1. 1383 client_secret 1384 REQUIRED. The client secret as described in Section 2.1. 1385 OPTIONAL if no client secret was issued. 1387 username 1388 REQUIRED. The end-user's username. 1390 password 1391 REQUIRED. The end-user's password. 1393 scope 1394 OPTIONAL. The scope of the access request expressed as a list 1395 of space-delimited strings. The value of the "scope" parameter 1396 is defined by the authorization server. If the value contains 1397 multiple space-delimited strings, their order does not matter, 1398 and each string adds an additional access range to the 1399 requested scope. 1401 format 1402 OPTIONAL. The response format requested by the client. Value 1403 MUST be one of "json", "xml", or "form". Alternatively, the 1404 client MAY use the HTTP "Accept" header field with the desired 1405 media type. Defaults to "json" if omitted and no "Accept" 1406 header field is present. 1408 For example, the client makes the following HTTPS request (line 1409 breaks are for display purposes only): 1411 POST /token HTTP/1.1 1412 Host: server.example.com 1413 Content-Type: application/x-www-form-urlencoded 1415 type=username&client_id=s6BhdRkqt3&client_secret= 1416 47HDu8s&username=johndoe&password=A3ddj3w 1418 The authorization server MUST validate the client credentials and 1419 end-user credentials and if valid issues an access token response as 1420 described in Section 2.3.2.1. 1422 For example: 1424 HTTP/1.1 200 OK 1425 Content-Type: application/json 1426 Cache-Control: no-store 1428 { 1429 "access_token":"SlAV32hkKG", 1430 "expires_in":3600, 1431 "refresh_token":"8xLOxBtZp8" 1433 } 1435 If the request is invalid, the authorization server returns an error 1436 response as described in Section 2.3.2.2 with one of the following 1437 error codes: 1439 o "incorrect_client_credentials" 1441 o "unauthorized_client'" - The client is not permitted to use this 1442 flow. 1444 For example: 1446 HTTP/1.1 400 Bad Request 1447 Content-Type: application/json 1448 Cache-Control: no-store 1450 { 1451 "error":"incorrect_client_credentials" 1452 } 1454 2.9. Client Credentials Flow 1456 The client credentials flow is used when the client acts on behalf of 1457 itself (the client is the resource owner), or when the client 1458 credentials are used to obtain an access token representing a 1459 previously established access authorization. The client secret is 1460 assumed to be high-entropy since it is not designed to be memorized 1461 by an end-user. 1463 +--------+ +---------------+ 1464 | | | | 1465 | |>--(A)--- Client Credentials ---->| Authorization | 1466 | Client | | Server | 1467 | |<--(B)---- Access Token ---------<| | 1468 | | (w/ Optional Refresh Token) | | 1469 +--------+ +---------------+ 1471 Figure 7: Client Credentials Flow 1473 The client credential flow illustrated in Figure 7 includes the 1474 following steps: 1476 (A) The client sends an access token request to the authorization 1477 server and includes its client identifier and client secret. 1479 (B) The authorization server validates the client credentials and 1480 issues an access token. 1482 2.9.1. Client Requests Access Token 1484 The client requests an access token by making an HTTP "POST" request 1485 to the token endpoint. The client constructs a request URI by adding 1486 the following parameters to the request: 1488 type 1489 REQUIRED. The parameter value MUST be set to 1490 "client_credentials". 1492 client_id 1493 REQUIRED. The client identifier as described in Section 2.1. 1495 client_secret 1496 REQUIRED. The client secret as described in Section 2.1. 1498 scope 1499 OPTIONAL. The scope of the access request expressed as a list 1500 of space-delimited strings. The value of the "scope" parameter 1501 is defined by the authorization server. If the value contains 1502 multiple space-delimited strings, their order does not matter, 1503 and each string adds an additional access range to the 1504 requested scope. 1506 format 1507 OPTIONAL. The response format requested by the client. Value 1508 MUST be one of "json", "xml", or "form". Alternatively, the 1509 client MAY use the HTTP "Accept" header field with the desired 1510 media type. Defaults to "json" if omitted and no "Accept" 1511 header field is present. 1513 For example, the client makes the following HTTPS request: 1515 POST /token HTTP/1.1 1516 Host: server.example.com 1517 Content-Type: application/x-www-form-urlencoded 1519 type=client_credentials&client_id=s6BhdRkqt3&client_secret=47HDu8s 1521 The authorization server MUST validate the client credentials and if 1522 valid issues an access token response as described in 1523 Section 2.3.2.1. 1525 For example: 1527 HTTP/1.1 200 OK 1528 Content-Type: application/json 1529 Cache-Control: no-store 1531 { 1532 "access_token":"SlAV32hkKG", 1533 "expires_in":3600, 1534 "refresh_token":"8xLOxBtZp8" 1535 } 1537 If the request is invalid, the authorization server returns an error 1538 response as described in Section 2.3.2.2 with one of the following 1539 error codes: 1541 o "incorrect_client_credentials" 1543 For example: 1545 HTTP/1.1 400 Bad Request 1546 Content-Type: application/json 1547 Cache-Control: no-store 1549 { 1550 "error":"incorrect_client_credentials" 1551 } 1553 2.10. Assertion Flow 1555 The assertion flow is used when a client wishes to exchange an 1556 existing security token or assertion for an access token. This flow 1557 is suitable when the client is the resource owner or is acting on 1558 behalf of the resource owner (based on the content of the assertion 1559 used). 1561 The assertion flow requires the client to obtain a assertion (such as 1562 a SAML [OASIS.saml-core-2.0-os] assertion) from an assertion issuer 1563 or to self-issue an assertion prior to initiating the flow. The 1564 assertion format, the process by which the assertion is obtained, and 1565 the method of validating the assertion are defined by the assertion 1566 issuer and the authorization server, and are beyond the scope of this 1567 specification. 1569 +--------+ +---------------+ 1570 | | | | 1571 | |>--(A)------ Assertion ---------->| Authorization | 1572 | Client | | Server | 1573 | |<--(B)---- Access Token ---------<| | 1574 | | | | 1575 +--------+ +---------------+ 1577 Figure 8: Assertion Flow 1579 The assertion flow illustrated in Figure 8 includes the following 1580 steps: 1582 (A) The client sends an access token request to the authorization 1583 server and includes an assertion. 1585 (B) The authorization server validates the assertion and issues an 1586 access token. 1588 2.10.1. Client Requests Access Token 1590 The client requests an access token by making an HTTP "POST" request 1591 to the token endpoint. The client constructs a request URI by adding 1592 the following parameters to the request: 1594 type 1595 REQUIRED. The parameter value MUST be set to "assertion". 1597 assertion_format 1598 REQUIRED. The format of the assertion as defined by the 1599 authorization server. The value MUST be an absolute URI. 1601 assertion 1602 REQUIRED. The assertion. 1604 client_id 1605 OPTIONAL. The client identifier as described in Section 2.1. 1606 The authorization server MAY require including the client 1607 credentials with the request based on the assertion properties. 1609 client_secret 1610 OPTIONAL. The client secret as described in Section 2.1. MUST 1611 NOT be included if the "client_id" parameter is omitted. 1613 scope 1614 OPTIONAL. The scope of the access request expressed as a list 1615 of space-delimited strings. The value of the "scope" parameter 1616 is defined by the authorization server. If the value contains 1617 multiple space-delimited strings, their order does not matter, 1618 and each string adds an additional access range to the 1619 requested scope. 1621 format 1622 OPTIONAL. The response format requested by the client. Value 1623 MUST be one of "json", "xml", or "form". Alternatively, the 1624 client MAY use the HTTP "Accept" header field with the desired 1625 media type. Defaults to "json" if omitted and no "Accept" 1626 header field is present. 1628 For example, the client makes the following HTTPS request (line 1629 breaks are for display purposes only): 1631 POST /token HTTP/1.1 1632 Host: server.example.com 1633 Content-Type: application/x-www-form-urlencoded 1635 type=assertion&assertion_format=_______&assertion=_______ 1637 The authorization server MUST validate the assertion and if valid 1638 issues an access token response as described in Section 2.3.2.1. The 1639 authorization server SHOULD NOT issue a refresh token. 1641 For example: 1643 HTTP/1.1 200 OK 1644 Content-Type: application/json 1645 Cache-Control: no-store 1647 { 1648 "access_token":"SlAV32hkKG", 1649 "expires_in":3600 1650 } 1652 If the request is invalid, the authorization server returns an error 1653 response as described in Section 2.3.2.2 with one of the following 1654 error codes: 1656 o "invalid_assertion" 1658 o "unknown_format" 1660 For example: 1662 HTTP/1.1 400 Bad Request 1663 Content-Type: application/json 1664 Cache-Control: no-store 1666 { 1667 "error":"invalid_assertion" 1668 } 1670 Authorization servers SHOULD issue access tokens with a limited 1671 lifetime and require clients to refresh them by requesting a new 1672 access token using the same assertion if it is still valid. 1673 Otherwise the client MUST obtain a new valid assertion. 1675 2.11. Native Application Considerations 1677 Native application are clients running as native code on the end- 1678 user's computer or device (i.e. executing outside a browser or as a 1679 desktop program). These clients are often capable of interacting 1680 with (or embedding) the end-user's user-agent but are incapable of 1681 receiving callback requests from the server (incapable of acting as 1682 an HTTP server). 1684 Native application clients can utilize many of the flows defined in 1685 this specification with little or no changes. For example: 1687 o Launch an external user-agent and have it redirect back to the 1688 client using a custom URI scheme. This works with the web server 1689 flow and user-agent flow. 1691 o Launch an external user-agent and poll for changes to the window 1692 title. This works with the web server flow with a server-hosted 1693 custom redirect result page that puts the verification code in the 1694 title. 1696 o Use an embedded user-agent and obtain the redirection URI. This 1697 works with the web server flow and user-agent flow. 1699 o Use the device profile with an external or embedded user-agent. 1700 The application will open a user-agent and then poll the 1701 authorization server for results. 1703 o Use the username and password flow and prompt the end-users for 1704 their credentials. This is generally discouraged as it hands the 1705 end-user's password directly to the 3rd party and may not work 1706 with some authentication schemes. 1708 When choosing between launching an external browser and an embedded 1709 user-agent, developers should consider the following: 1711 o External user-agents may improve completion rate as the end-user 1712 may already be logged-in and not have to re-authenticate. 1714 o Embedded user-agents often offer a better end-user flow, as they 1715 remove the need to switch context and open new windows. 1717 o Embedded user-agents are less secure because users are 1718 authenticating in unidentified window without access to the 1719 protections offered by many user-agents. 1721 3. Refreshing an Access Token 1723 Token refresh is used when the lifetime of an access token is shorter 1724 than the lifetime of the authorization grant. It allows clients to 1725 obtain a new access token without having to go through the 1726 authorization flow again or involve the resource owner. 1728 +--------+ +---------------+ 1729 | | Client Credentials, | | 1730 | |>--(A)----- Refresh Token ------->| Authorization | 1731 | Client | | Server | 1732 | |<--(B)----- Access Token --------<| | 1733 | | | | 1734 +--------+ +---------------+ 1736 Figure 9: Refreshing an Access Token 1738 To refresh a token, the client constructs an HTTP "POST" request to 1739 the token endpoint and includes the following parameters in the HTTP 1740 request body using the "application/x-www-form-urlencoded" content 1741 type as defined by [W3C.REC-html401-19991224]: 1743 type 1744 REQUIRED. The parameter value MUST be set to "refresh". 1746 client_id 1747 REQUIRED. The client identifier as described in Section 2.1. 1749 client_secret 1750 REQUIRED if the client was issued a secret. The client secret. 1752 refresh_token 1753 REQUIRED. The refresh token associated with the access token 1754 to be refreshed. 1756 format 1757 OPTIONAL. The response format requested by the client. Value 1758 MUST be one of "json", "xml", or "form". Alternatively, the 1759 client MAY use the HTTP "Accept" header field with the desired 1760 media type. Defaults to "json" if omitted and no "Accept" 1761 header field is present. 1763 For example, the client makes the following HTTPS request (line break 1764 are for display purposes only): 1766 POST /token HTTP/1.1 1767 Host: server.example.com 1768 Content-Type: application/x-www-form-urlencoded 1770 type=refresh_token&client_id=s6BhdRkqt3&client_secret=8eSEIpnqmM 1771 &refresh_token=n4E9O119d 1773 verify the client credential, the validity of the refresh token, and 1774 that the resource owner's authorization is still valid. If the 1775 request is valid, the authorization server issues an access token 1776 response as described in Section 2.3.2.1. The authorization server 1777 MAY issue a new refresh token in which case the client MUST NOT use 1778 the previous refresh token and replace it with the newly issued 1779 refresh token. 1781 For example: 1783 HTTP/1.1 200 OK 1784 Content-Type: application/json 1785 Cache-Control: no-store 1787 { 1788 "access_token":"SlAV32hkKG", 1789 "expires_in":3600 1790 } 1792 If the request is invalid, the authorization server returns an error 1793 response as described in Section 2.3.2.2 with one of the following 1794 error codes: 1796 o "incorrect_client_credentials" 1798 o "authorization_expired" 1800 For example: 1802 HTTP/1.1 400 Bad Request 1803 Content-Type: application/json 1804 Cache-Control: no-store 1806 { 1807 "error":"incorrect_client_credentials" 1808 } 1810 4. Accessing a Protected Resource 1812 Clients access protected resources by presenting an access token to 1813 the resource server. 1815 For example: 1817 GET /resource HTTP/1.1 1818 Host: server.example.com 1819 Authorization: Token token="vF9dft4qmT" 1821 Access tokens act as bearer tokens, where the token string acts as a 1822 shared symmetric secret. This requires treating the access token 1823 with the same care as other secrets (e.g. end-user passwords). 1824 Access tokens SHOULD NOT be sent in the clear over an insecure 1825 channel. 1827 However, when it is necessary to transmit bearer tokens in the clear 1828 without a secure channel, authorization servers SHOULD issue access 1829 tokens with limited scope and lifetime to reduce the potential risk 1830 from a compromised access token. 1832 Clients SHOULD NOT make authenticated requests with an access token 1833 to unfamiliar resource servers, especially when using bearer tokens, 1834 regardless of the presence of a secure channel. 1836 The methods used by the resource server to validate the access token 1837 are beyond the scope of this specification, but generally involve an 1838 interaction or coordination between the resource server and 1839 authorization server. 1841 The resource server MUST validate the access token and ensure it has 1842 not expired and that its scope covers the requested resource. If the 1843 token expired or is invalid, the resource server MUST reply with an 1844 HTTP 401 status code (Unauthorized) and include the HTTP 1845 "WWW-Authenticate" response header as described in Section 5.1. 1847 For example: 1849 HTTP/1.1 401 Unauthorized 1850 WWW-Authenticate: Token realm='Service', error='token_expired' 1852 Clients make authenticated token requests using the "Authorization" 1853 request header field as described in Section 4.1. Alternatively, 1854 clients MAY include the access token using the HTTP request URI in 1855 the query component as described in Section 4.2, or in the HTTP body 1856 when using the "application/x-www-form-urlencoded" content type as 1857 described in Section 4.3. 1859 Clients SHOULD only use the request URI or body when the 1860 "Authorization" request header field is not available, and MUST NOT 1861 use more than one method in each request. [[ specify error ]] 1863 4.1. The Authorization Request Header 1865 The "Authorization" request header field is used by clients to make 1866 authenticated token requests. The client uses the "token" attribute 1867 to include the access token in the request. 1869 The "Authorization" header field uses the framework defined by 1870 [RFC2617] as follows: 1872 credentials = "Token" RWS access-token [ CS 1#auth-param ] 1873 access-token = "token" "=" <"> token <"> 1874 CS = OWS "," OWS 1876 4.2. URI Query Parameter 1878 When including the access token in the HTTP request URI, the client 1879 adds the access token to the request URI query component as defined 1880 by [RFC3986] using the "oauth_token" parameter. 1882 For example, the client makes the following HTTPS request: 1884 GET /resource?oauth_token=vF9dft4qmT HTTP/1.1 1885 Host: server.example.com 1887 The HTTP request URI query can include other request-specific 1888 parameters, in which case, the "oauth_token" parameters SHOULD be 1889 appended following the request-specific parameters, properly 1890 separated by an "&" character (ASCII code 38). 1892 The resource server MUST validate the access token and ensure it has 1893 not expired and its scope includes the requested resource. If the 1894 resource expired or is not valid, the resource server MUST reply with 1895 an HTTP 401 status code (Unauthorized) and include the HTTP 1896 "WWW-Authenticate" response header as described in Section 5.1. 1898 4.3. Form-Encoded Body Parameter 1900 When including the access token in the HTTP request entity-body, the 1901 client adds the access token to the request body using the 1902 "oauth_token" parameter. The client can use this method only if the 1903 following REQUIRED conditions are met: 1905 o The entity-body is single-part. 1907 o The entity-body follows the encoding requirements of the 1908 "application/x-www-form-urlencoded" content-type as defined by 1909 [W3C.REC-html401-19991224]. 1911 o The HTTP request entity-header includes the "Content-Type" header 1912 field set to "application/x-www-form-urlencoded". 1914 o The HTTP request method is "POST", "PUT", or "DELETE". 1916 The entity-body can include other request-specific parameters, in 1917 which case, the "oauth_token" parameters SHOULD be appended following 1918 the request-specific parameters, properly separated by an "&" 1919 character (ASCII code 38). 1921 For example, the client makes the following HTTPS request: 1923 POST /resource HTTP/1.1 1924 Host: server.example.com 1925 Content-Type: application/x-www-form-urlencoded 1927 oauth_token=vF9dft4qmT 1929 The resource server MUST validate the access token and ensure it has 1930 not expired and its scope includes the requested resource. If the 1931 resource expired or is not valid, the resource server MUST reply with 1932 an HTTP 401 status code (Unauthorized) and include the HTTP 1933 "WWW-Authenticate" response header as described in Section 5.1. 1935 5. Identifying a Protected Resource 1937 Clients access protected resources after locating the appropriate 1938 end-user and token endpoints and obtaining an access token. In many 1939 cases, interacting with a protected resource requires prior knowledge 1940 of the protected resource properties and methods, as well as its 1941 authentication requirements (i.e. establishing client identity, 1942 locating the end-user and token endpoints). 1944 However, there are cases in which clients are unfamiliar with the 1945 protected resource, including whether the resource requires 1946 authentication. When clients attempt to access an unfamiliar 1947 protected resource without an access token, the resource server 1948 denies the request and informs the client of the required credentials 1949 using an HTTP authentication challenge. 1951 In addition, when receiving an invalid authenticated request, the 1952 resource server issues an authentication challenge including the 1953 error type and message. 1955 5.1. The WWW-Authenticate Response Header 1957 A resource server receiving a request for a protected resource 1958 without a valid access token MUST respond with a 401 (Unauthorized) 1959 or 403 (Forbidden) HTTP status code, and include at least one "Token" 1960 "WWW-Authenticate" response header field challenge. 1962 The "WWW-Authenticate" header field uses the framework defined by 1963 [RFC2617] as follows: 1965 challenge = "Token" RWS token-challenge 1967 token-challenge = realm 1968 [ CS error ] 1969 [ CS 1#auth-param ] 1971 error = "error" "=" <"> token <"> 1973 The "realm" attribute is used to provide the protected resources 1974 partition as defined by [RFC2617]. 1976 The "error" attribute is used to inform the client the reason why an 1977 access request was declined. [[ Add list of error codes ]] 1979 6. Security Considerations 1981 [[ Todo ]] 1983 7. IANA Considerations 1985 [[ Not Yet ]] 1987 Appendix A. Contributors 1989 The following people contributed to preliminary versions of this 1990 document: Blaine Cook (BT), Brian Eaton (Google), Yaron Goland 1991 (Microsoft), Brent Goldman (Facebook), Raffi Krikorian (Twitter), 1992 Luke Shepard (Facebook), and Allen Tom (Yahoo!). The content and 1993 concepts within are a product of the OAuth community, WRAP community, 1994 and the OAuth Working Group. 1996 The OAuth Working Group has dozens of very active contributors who 1997 proposed ideas and wording for this document, including: [[ If your 1998 name is missing or you think someone should be added here, please 1999 send Eran a note - don't be shy ]] 2001 Michael Adams, Andrew Arnott, Dirk Balfanz, Brian Campbell, Leah 2002 Culver, Igor Faynberg, George Fletcher, Evan Gilbert, Justin Hart, 2003 John Kemp, Torsten Lodderstedt, Eve Maler, James Manger, Chuck 2004 Mortimore, Justin Richer, Peter Saint-Andre, Nat Sakimura, Rob Sayre, 2005 Marius Scurtescu, Justin Smith, and Franklin Tse. 2007 Appendix B. Acknowledgements 2009 [[ Add OAuth 1.0a authors + WG contributors ]] 2011 Appendix C. Differences from OAuth 1.0a 2013 [[ Todo ]] 2015 Appendix D. Document History 2017 [[ to be removed by RFC editor before publication as an RFC ]] 2019 -06 2021 o Editorial changes, corrections, clarifications, etc. 2023 o Removed conformance section. 2025 o Moved authors section to contributors appendix. 2027 o Added section on native applications. 2029 o Changed error response to use the requested format. Added support 2030 for HTTP "Accept" header. 2032 o Flipped the order of the web server and user-agent flows. 2034 o Renamed assertion flow "format" parameter name to 2035 "assertion_format" to resolve conflict. 2037 o Removed the term identifier from token definitions. Added a 2038 cryptographic token definition. 2040 o Added figure titles. 2042 o Added server response 401 when client tried to authenticate using 2043 multiple credentials. 2045 o Clarified support for TLS alternatives, and added requirement for 2046 TLS 1.2 support for token endpoint. 2048 o Removed all signature and cryptography. 2050 o Removed all discovery. 2052 o Updated HTML4 reference. 2054 -05 2056 o Corrected device example. 2058 o Added client credentials parameters to the assertion flow as 2059 OPTIONAL. 2061 o Added the ability to send client credentials using an HTTP 2062 authentication scheme. 2064 o Initial text for the "WWW-Authenticate" header (also added scope 2065 support). 2067 o Change authorization endpoint to end-user endpoint. 2069 o In the device flow, change the "user_uri" parameter to 2070 "verification_uri" to avoid confusion with the end-user endpoint. 2072 o Add "format" request parameter and support for XML and form- 2073 encoded responses. 2075 -04 2077 o Changed all token endpoints to use "POST" 2079 o Clarified the authorization server's ability to issue a new 2080 refresh token when refreshing a token. 2082 o Changed the flow categories to clarify the autonomous group. 2084 o Changed client credentials language not to always be server- 2085 issued. 2087 o Added a "scope" response parameter. 2089 o Fixed typos. 2091 o Fixed broken document structure. 2093 -03 2094 o Fixed typo in JSON error examples. 2096 o Fixed general typos. 2098 o Moved all flows sections up one level. 2100 -02 2102 o Removed restriction on "redirect_uri" including a query. 2104 o Added "scope" parameter. 2106 o Initial proposal for a JSON-based token response format. 2108 -01 2110 o Editorial changes based on feedback from Brian Eaton, Bill Keenan, 2111 and Chuck Mortimore. 2113 o Changed device flow "type" parameter values and switch to use only 2114 the token endpoint. 2116 -00 2118 o Initial draft based on a combination of WRAP and OAuth 1.0a. 2120 8. References 2122 8.1. Normative References 2124 [I-D.ietf-httpbis-p1-messaging] 2125 Fielding, R., Gettys, J., Mogul, J., Nielsen, H., 2126 Masinter, L., Leach, P., Berners-Lee, T., and J. Reschke, 2127 "HTTP/1.1, part 1: URIs, Connections, and Message 2128 Parsing", draft-ietf-httpbis-p1-messaging-09 (work in 2129 progress), March 2010. 2131 [NIST FIPS-180-3] 2132 National Institute of Standards and Technology, "Secure 2133 Hash Standard (SHS). FIPS PUB 180-3, October 2008". 2135 [RFC2045] Freed, N. and N. Borenstein, "Multipurpose Internet Mail 2136 Extensions (MIME) Part One: Format of Internet Message 2137 Bodies", RFC 2045, November 1996. 2139 [RFC2104] Krawczyk, H., Bellare, M., and R. Canetti, "HMAC: Keyed- 2140 Hashing for Message Authentication", RFC 2104, 2141 February 1997. 2143 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 2144 Requirement Levels", BCP 14, RFC 2119, March 1997. 2146 [RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., 2147 Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext 2148 Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999. 2150 [RFC2617] Franks, J., Hallam-Baker, P., Hostetler, J., Lawrence, S., 2151 Leach, P., Luotonen, A., and L. Stewart, "HTTP 2152 Authentication: Basic and Digest Access Authentication", 2153 RFC 2617, June 1999. 2155 [RFC2818] Rescorla, E., "HTTP Over TLS", RFC 2818, May 2000. 2157 [RFC3023] Murata, M., St. Laurent, S., and D. Kohn, "XML Media 2158 Types", RFC 3023, January 2001. 2160 [RFC3447] Jonsson, J. and B. Kaliski, "Public-Key Cryptography 2161 Standards (PKCS) #1: RSA Cryptography Specifications 2162 Version 2.1", RFC 3447, February 2003. 2164 [RFC3629] Yergeau, F., "UTF-8, a transformation format of ISO 2165 10646", STD 63, RFC 3629, November 2003. 2167 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 2168 Resource Identifier (URI): Generic Syntax", STD 66, 2169 RFC 3986, January 2005. 2171 [RFC4627] Crockford, D., "The application/json Media Type for 2172 JavaScript Object Notation (JSON)", RFC 4627, July 2006. 2174 [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security 2175 (TLS) Protocol Version 1.2", RFC 5246, August 2008. 2177 [W3C.REC-html401-19991224] 2178 Hors, A., Jacobs, I., and D. Raggett, "HTML 4.01 2179 Specification", World Wide Web Consortium 2180 Recommendation REC-html401-19991224, December 1999, 2181 . 2183 8.2. Informative References 2185 [I-D.hammer-oauth] 2186 Hammer-Lahav, E., "The OAuth 1.0 Protocol", 2187 draft-hammer-oauth-10 (work in progress), February 2010. 2189 [I-D.hardt-oauth] 2190 Hardt, D., Tom, A., Eaton, B., and Y. Goland, "OAuth Web 2191 Resource Authorization Profiles", draft-hardt-oauth-01 2192 (work in progress), January 2010. 2194 [OASIS.saml-core-2.0-os] 2195 Cantor, S., Kemp, J., Philpott, R., and E. Maler, 2196 "Assertions and Protocol for the OASIS Security Assertion 2197 Markup Language (SAML) V2.0", OASIS Standard saml-core- 2198 2.0-os, March 2005. 2200 Authors' Addresses 2202 Eran Hammer-Lahav (editor) 2203 Yahoo! 2205 Email: eran@hueniverse.com 2206 URI: http://hueniverse.com 2208 David Recordon 2209 Facebook 2211 Email: davidrecordon@facebook.com 2212 URI: http://www.davidrecordon.com/ 2214 Dick Hardt 2215 Microsoft 2217 Email: dick.hardt@gmail.com 2218 URI: http://dickhardt.org/