idnits 2.17.00 (12 Aug 2021) /tmp/idnits30533/draft-ietf-oauth-v2-01.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 (April 29, 2010) is 4404 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 2066, but no explicit reference was found in the text == Unused Reference: 'RFC3447' is defined on line 2092, but no explicit reference was found in the text == Unused Reference: 'RFC3629' is defined on line 2096, but no explicit reference was found in the text == Unused Reference: 'I-D.hammer-oauth' is defined on line 2111, but no explicit reference was found in the text == Unused Reference: 'I-D.hardt-oauth' is defined on line 2115, but no explicit reference was found in the text == Outdated reference: draft-ietf-httpbis-p1-messaging has been published as RFC 7230 -- 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) ** Downref: Normative reference to an Informational RFC: RFC 2818 ** Obsolete normative reference: RFC 3447 (Obsoleted by RFC 8017) == Outdated reference: draft-hammer-oauth has been published as RFC 5849 Summary: 5 errors (**), 0 flaws (~~), 9 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: October 31, 2010 Facebook 6 D. Hardt 7 April 29, 2010 9 The OAuth 2.0 Protocol 10 draft-ietf-oauth-v2-01 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 October 31, 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.3. Flow Parameters . . . . . . . . . . . . . . . . . . . . . 10 67 3.4. Client Credentials . . . . . . . . . . . . . . . . . . . . 10 68 3.5. User Delegation Flows . . . . . . . . . . . . . . . . . . 11 69 3.5.1. User-Agent Flow . . . . . . . . . . . . . . . . . . . 11 70 3.5.2. Web Server Flow . . . . . . . . . . . . . . . . . . . 16 71 3.5.3. Device Flow . . . . . . . . . . . . . . . . . . . . . 22 72 3.6. End-user Credentials Flows . . . . . . . . . . . . . . . . 27 73 3.6.1. Username and Password Flow . . . . . . . . . . . . . . 27 74 3.7. Autonomous Client Flows . . . . . . . . . . . . . . . . . 30 75 3.7.1. Client Credentials Flow . . . . . . . . . . . . . . . 30 76 3.7.2. Assertion Flow . . . . . . . . . . . . . . . . . . . . 33 77 4. Refreshing an Access Token . . . . . . . . . . . . . . . . . . 35 78 5. Accessing a Protected Resource . . . . . . . . . . . . . . . . 38 79 5.1. The Authorization Request Header . . . . . . . . . . . . . 38 80 5.2. Bearer Token Requests . . . . . . . . . . . . . . . . . . 40 81 5.2.1. URI Query Parameter . . . . . . . . . . . . . . . . . 40 82 5.2.2. Form-Encoded Body Parameter . . . . . . . . . . . . . 41 83 5.3. Cryptographic Tokens Requests . . . . . . . . . . . . . . 42 84 5.3.1. The 'hmac-sha256' Algorithm . . . . . . . . . . . . . 42 85 6. Identifying a Protected Resource . . . . . . . . . . . . . . . 45 86 6.1. The WWW-Authenticate Response Header . . . . . . . . . . . 45 87 6.1.1. The 'realm' Attribute . . . . . . . . . . . . . . . . 46 88 6.1.2. The 'authorization-uri' Attribute . . . . . . . . . . 46 89 6.1.3. The 'algorithms' Attribute . . . . . . . . . . . . . . 46 90 6.1.4. The 'error' Attribute . . . . . . . . . . . . . . . . 46 91 7. Security Considerations . . . . . . . . . . . . . . . . . . . 46 92 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 46 93 9. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 46 94 Appendix A. Differences from OAuth 1.0a . . . . . . . . . . . . . 46 95 Appendix B. Document History . . . . . . . . . . . . . . . . . . 47 96 10. References . . . . . . . . . . . . . . . . . . . . . . . . . . 47 97 10.1. Normative References . . . . . . . . . . . . . . . . . . . 47 98 10.2. Informative References . . . . . . . . . . . . . . . . . . 48 99 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 48 101 1. Authors 103 This specification was authored with the participation and based on 104 the work of Allen Tom (Yahoo!), Brian Eaton (Google), Brent Goldman 105 (Facebook), Luke Shepard (Facebook), Raffi Krikorian (Twitter), and 106 Yaron Goland (Microsoft). 108 2. Introduction 110 With the increasing use of distributed web services and cloud 111 computing, third-party applications require access to server-hosted 112 resources. These resources are usually protected and require 113 authentication using the resource owner's credentials (typically a 114 username and password). In the traditional client-server 115 authentication model, a client accessing a protected resource on a 116 server presents the resource owner's credentials in order to 117 authenticate and gain access. 119 Resource owners should not be required to share their credentials 120 when granting third-party applications access to their protected 121 resources. They should also have the ability to restrict access to a 122 limited subset of the resources they control, to limit access 123 duration, or to limit access to the HTTP methods supported by these 124 resources. 126 OAuth provides a method for making authenticated HTTP requests using 127 a token - an identifier used to denote an access grant with specific 128 scope, duration, and other attributes. Tokens are issued to third- 129 party clients by an authorization server with the approval of the 130 resource owner. Instead of sharing their credentials with the 131 client, resource owners grant access by authenticating directly with 132 the authorization server which in turn issues a token to the client. 133 The client uses the token (and optional secret) to authenticate with 134 the resource server and gain access. 136 For example, a web user (resource owner) can grant a printing service 137 (client) access to her protected photos stored at a photo sharing 138 service (resource server), without sharing her username and password 139 with the printing service. Instead, she authenticates directly with 140 the photo sharing service (authorization server) which issues the 141 printing service delegation-specific credentials (token). 143 This specification defines the use of OAuth over HTTP [RFC2616] (or 144 HTTP over TLS 1.0 as defined by [RFC2818]. Other specifications may 145 extend it for use with other tranport protocols. 147 2.1. Terminology 149 resource server 150 An HTTP [RFC2616] server capable of accepting authenticated 151 resource requests using the OAuth protocol. 153 protected resource 154 An access-restricted resource which can be obtained from a 155 resource server using an OAuth-authenticated request. 157 client 158 An HTTP client capable of making authenticated requests for 159 protected resources using the OAuth protocol. 161 resource owner 162 An entity capable of granting access to a protected resource. 164 end-user 165 A human resource owner. 167 access token 168 A unique identifier used by the client to make authenticated 169 requests on behalf of the resource owner. Access tokens may 170 have a matching secret. 172 bearer token An access token without a matching secret, used to 173 obtain access to a protected resource by simply presenting the 174 access token as-is to the resource server. 176 authorization server 177 An HTTP server capable of issuing tokens after successfully 178 authenticating the resource owner and obtaining authorization. 179 The authorization server may be the same server as the resource 180 server, or a separate entity. 182 authorization endpoint 183 The authorization server's HTTP endpoint capable of 184 authenticating the resource owner and obtaining authorization. 186 token endpoint 187 The authorization server's HTTP endpoint capable of issuing 188 tokens and refreshing expired tokens. 190 client identifier 191 An unique identifier issued to the client to identify itself to 192 the authorization server. Client identifiers may have a 193 matching secret. 195 refresh token 196 A unique identifier used by the client to replace an expired 197 access token with a new access token without having to involve 198 the resource owner. A refresh token is used when the access 199 token is valid for a shorter time period than the duration of 200 the access grant approved by the resource owner. 202 2.2. Overview 204 Clients interact with a protected resource, first by requesting 205 access (which is granted in the form of an access token) from the 206 authorization server, and then by authenticating with the resource 207 server by presenting the access token. Figure 1 demonstrates the 208 flow between the client and authorization server (A, B), and the flow 209 between the client and resource server (C, D), when the client is 210 acting autonomously (the client is also the resource owner). 212 +--------+ +---------------+ 213 | |--(A)------ Credentials --------->| Authorization | 214 | | | Server | 215 | |<-(B)------ Access Token ---------| | 216 | | (w/ Optional Refresh Token) +---------------+ 217 | Client | 218 | | HTTP Request +---------------+ 219 | |--(C)--- with Access Token ------>| Resource | 220 | | | Server | 221 | |<-(D)------ HTTP Response --------| | 222 +--------+ +---------------+ 224 Figure 1 226 Access token strings can use any internal structure agreed upon 227 between the authorization server and the resource server, but their 228 structure is opaque to the client. Since the access token provides 229 the client access to the protected resource for the life of the 230 access token (or until revoked), the authorization server should 231 issue access tokens which expire within an appropriate time, usually 232 much shorter than the duration of the access grant. 234 When an access token expires, the client can request a new access 235 token from the authorization server by presenting its credentials 236 again (Figure 1), or by using the refresh token (if issued with the 237 access token) as shown in Figure 2. Once an expired access token has 238 been replaced with a new access token (A, B), the client uses the new 239 access token as before (C, D). 241 +--------+ +---------------+ 242 | |--(A)------ Refresh Token ------->| Authorization | 243 | | | Server | 244 | |<-(B)------ Access Token ---------| | 245 | | (with Optional Secret) +---------------+ 246 | Client | 247 | | HTTP Request +---------------+ 248 | |--(C)--- with Access Token ------>| Resource | 249 | | | Server | 250 | |<-(D)----- HTTP Response ---------| | 251 +--------+ +---------------+ 253 Figure 2 255 This specification defines a number of authorization flows to support 256 different client types and scenarios. These authorization flows can 257 be separated into three groups: user delegation flows, end-user 258 credentials flows, and autonomous flows. 260 Additional authorization flows may be defined by other specifications 261 to cover different scenarios and client types. 263 User delegation authorization enable clients to act on behalf of an 264 end-user after obtaining authorization from the end-user. The user 265 delegation flows defined by this specifications are: 267 o User-Agent Flow - This flow is designed for clients running inside 268 a user-agent (typically a web browser). This flow is described in 269 Section 3.5.1. 271 o Web Server Flow - This flow is optimized for clients that are part 272 of a web server application, accessible via HTTP requests. This 273 flow is described in Section 3.5.2. 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 3.5.3. 280 End-user credentials flow enable clients with direct access to the 281 end-user's credentials to exchange them for an access token without 282 seeking additional authorization. These flows are only suitable when 283 there is a high degree of trust between the end-user and the client. 284 The end-user credentials flow defined by this specification is: 286 o Username and Password Flow - This flow is used in cases where the 287 end-user trusts the client to handle its credentials but it is 288 still undesirable for the client to store the end-user's username 289 and password. This flow is described in Section 3.6.1. 291 Autonomous flows enable clients to act for their own behalf (the 292 client is also the resource owner). The autonomous authorization 293 flows defined by this specifications are: 295 o Client Credentials Flow - The client uses its credentials to 296 obtain an access token. This flow is described in Section 3.7.1. 298 o Assertion Flow - The client presents an assertion such as a SAML 299 [OASIS.saml-core-2.0-os] assertion to the authorization server in 300 exchange for an access token. This flow is described in 301 Section 3.7.2. 303 2.3. Example 305 [[ Todo ]] 307 2.4. Notational Conventions 309 The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL NOT', 310 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'MAY', and 'OPTIONAL' in this 311 document are to be interpreted as described in [RFC2119]. 313 This document uses the Augmented Backus-Naur Form (ABNF) notation of 314 [I-D.ietf-httpbis-p1-messaging]. Additionally, the realm and auth- 315 param rules are included from [RFC2617], and the URI-Reference rule 316 from [RFC3986]. 318 2.5. Conformance 320 An implementation is not compliant if it fails to satisfy one or more 321 of the MUST or REQUIRED level requirements for the flows it 322 implements. An implementation that satisfies all the MUST or 323 REQUIRED level and all the SHOULD level requirements for its flows is 324 said to be "unconditionally compliant"; one that satisfies all the 325 MUST level requirements but not all the SHOULD level requirements for 326 its flows is said to be "conditionally compliant." 328 3. Obtaining an Access Token 330 The client obtains an access token by using one of the authorization 331 flows supported by the authorization server. The authorization flows 332 all use the same authorization and token endpoints, each with a 333 different set of request parameters and values. 335 Access tokens have a scope, duration, and other access attributes 336 granted by the resource owner. These attributes MUST be enforced by 337 the resource server when receiving a protected resource request, and 338 by the authorization server when receiving a token refresh request. 340 In many cases it is desirable to issue access tokens with a shorter 341 lifetime than the duration of the authorization grant. However, it 342 may be undesirable to require the resource owner to authorize the 343 request again. Instead, the authorization server issues a refresh 344 token in addition to the access token. When the access token 345 expires, the client can request a new access token without involving 346 the resource owner as long as the authorization grant is still valid. 347 The token refresh method is described in Section 4. 349 3.1. Authorization Endpoint 351 Clients direct the resource owner to the authorization endpoint to 352 approve their access request. Before granting access, the resource 353 owner first authenticates with the authorization server. The way in 354 which the authorization server authenticates the end-user (e.g. 355 username and password login, OpenID, session cookies) and in which 356 the authorization server obtains the end-user's authorization, 357 including whether it uses a secure channel such as TLS/SSL, is beyond 358 the scope of this specification. However, the authorization server 359 MUST first verify the identity of the end-user. 361 The URI of the authorization endpoint can be found in the service 362 documentation, or can be obtained by the client by making an 363 unauthorized protected resource request (from the "WWW-Authenticate" 364 response header auth-uri (Section 6.1.2) attribute). 366 The authorization endpoint advertised by the resource server MAY 367 include a query component as defined by [RFC3986] section 3. 369 Since requests to the authorization endpoint result in user 370 authentication and the transmission of sensitive values, the 371 authorization server SHOULD require the use of a transport-layer 372 mechanism such as TLS/SSL (or a secure channel with equivalent 373 protections) when sending requests to the authorization endpoints. 375 3.2. Token Endpoint 377 After obtaining authorization from the resource owner, clients 378 request an access token from the authorization server's token 379 endpoint. 381 The URI of the token endpoint can be found in the service 382 documentation, or can be obtained by the client by making an 383 unauthorized protected resource request (from the "WWW-Authenticate" 384 response header token-uri (Section 6.1.2) attribute). 386 The token endpoint advertised by the resource server MAY include a 387 query component as defined by [RFC3986] section 3. 389 Since requests to the token endpoint result in the transmission of 390 plain text credentials in the HTTP request and response, the 391 authorization server MUST require the use of a transport-layer 392 mechanism such as TLS/SSL (or a secure channel with equivalent 393 protections) when sending requests to the token endpoints. 395 The authorization server MUST include the HTTP "Cache-Control" 396 response header field with a value of "no-store" in any response 397 containing tokens, secrets, or other sensitive information. 399 3.3. Flow Parameters 401 The sizes of tokens and other values received from the authorization 402 server, are left undefined by this specification. Clients should 403 avoid making assumptions about value sizes. Servers should document 404 the expected size of any value they issue. 406 Unless otherwise noted, all the protocol parameter names and values 407 are case sensitive. 409 3.4. Client Credentials 411 When requesting access from the authorization server, the client 412 identifies itself using its authorization-server-issued client 413 credentials. The client credentials include a client identifier and 414 an OPTIONAL symmetric shared secret. The means through which the 415 client obtains these credentials are beyond the scope of this 416 specification, but usually involve registration with the 417 authorization server. 419 The client identifier is used by the authorization server to 420 establish the identity of the client for the purpose of presenting 421 information to the resource owner prior to granting access, as well 422 as for providing different service levels to different clients. They 423 can also be used to block unauthorized clients from requesting 424 access. 426 Due to the nature of some clients, authorization servers SHOULD NOT 427 make assumptions about the confidentiality of client credentials 428 without establishing trust with the client operator. Authorization 429 servers SHOULD NOT issue client secrets to clients incapable of 430 keeping their secrets confidential. 432 3.5. User Delegation Flows 434 User delegation flows are used to grant client access to protected 435 resources by the end-user without sharing the end-user credentials 436 (e.g. a username and password) with the client. Instead, the end- 437 user authenticates directly with the authorization server, and grants 438 client access to its protected resources. 440 3.5.1. User-Agent Flow 442 The user-agent flow is a user delegation flow suitable for client 443 applications residing in a user-agent, typically implemented in a 444 browser using a scripting language such as JavaScript. These clients 445 cannot keep client secrets confidential and the authentication of the 446 client is based on the user-agent's same-origin policy. 448 Unlike other flows in which the client makes separate authorization 449 and access token requests, the client received the access token as a 450 result of the authorization request in the form of an HTTP 451 redirection. The client requests the authorization server to 452 redirect the user-agent to another web server or local resource 453 accessible to the browser which is capable of extracting the access 454 token from the response and passing it to the client. 456 This user-agent flow does not utilize the client secret since the 457 client executables reside on the end-user's computer or device which 458 makes the client secret accessible and exploitable. Because the 459 access token is encoded into the redirection URI, it may be exposed 460 to the end-user and other applications residing on the computer or 461 device. 463 +----------+ Client Identifier +----------------+ 464 | |>---(A)-- & Redirection URI --->| | 465 | | | | 466 End <--+ - - - +----(B)-- User authenticates -->| Authorization | 467 User | | | Server | 468 | |<---(C)-- Redirect URI --------<| | 469 | Client | with Access Token | | 470 | in | (w/ Optional Refresh Token) +----------------+ 471 | Browser | in Fragment 472 | | +----------------+ 473 | |>---(D)-- Redirect URI -------->| | 474 | | without Fragment | Web Server | 475 | | | with Client | 476 | (F) |<---(E)-- Web Page with -------<| Resource | 477 | Access | Script | | 478 | Token | +----------------+ 479 +----------+ 481 Figure 3 483 The user-agent flow illustrated in Figure 3 includes the following 484 steps: 486 (A) The client sends the user-agent to the authorization server and 487 includes its client identifier and redirection URI in the 488 request. 490 (B) The authorization server authenticates the end-user (via the 491 user-agent) and establishes whether the end-user grants or 492 denies the client's access request. 494 (C) Assuming the end-user granted access, the authorization server 495 redirects the user-agent to the redirection URI provided 496 earlier. The redirection URI includes the access token in the 497 URI fragment. 499 (D) The user-agent follows the redirection instructions by making a 500 request to the web server which does not include the fragment. 501 The user-agent retains the fragment information locally. 503 (E) The web server returns a web page containing a script capable of 504 extracting the access token from the URI fragment retained by 505 the user-agent. 507 (F) The user-agent executes the script provided by the web server 508 which extracts the access token and passes it to the client. 510 3.5.1.1. Client Requests Authorization 512 In order for the end-user to grant the client access, the client 513 sends the end-user to the authorization server. The client 514 constructs the request URI by adding the following URI query 515 parameters to the user authorization endpoint URI: 517 type 518 REQUIRED. The parameter value MUST be set to "user_agent". 520 client_id 521 REQUIRED. The client identifier as described in Section 3.4. 523 redirect_uri 524 REQUIRED unless a redirection URI has been established between 525 the client and authorization server via other means. An 526 absolute URI to which the authorization server will redirect 527 the user-agent to when the end-user authorization step is 528 completed. The authorization server SHOULD require the client 529 to pre-register their redirection URI. The redirection URI 530 MUST NOT include a query component as defined by [RFC3986] 531 section 3 if the "state" parameter is present. 533 state 534 OPTIONAL. An opaque value used by the client to maintain state 535 between the request and callback. The authorization server 536 includes this value when redirecting the user-agent back to the 537 client. 539 immediate 540 OPTIONAL. The parameter value must be set to "true" or 541 "false". If set to "true", the authorization server MUST NOT 542 prompt the end-user to authenticate or approve access. 543 Instead, the authorization server attempts to establish the 544 end-user's identity via other means (e.g. browser cookies) and 545 checks if the end-user has previously approved an identical 546 access request by the same client and if that access grant is 547 still active. If the authorization server does not support an 548 immediate check or if it is unable to establish the end-user's 549 identity or approval status, it MUST deny the request without 550 prompting the end-user. Defaults to "false" if omitted. 552 secret_type 553 OPTIONAL. The access token secret type as described by 554 Section 5.3. If omitted, the authorization server will issue a 555 bearer token (an access token without a matching secret) as 556 described by Section 5.2. 558 The client directs the end-user to the constructed URI using an HTTP 559 redirection response, or by other means available to it via the end- 560 user's user-agent. The request MUST use the HTTP "GET" method. 562 For example, the client directs the end-user's user-agent to make the 563 following HTTPS request (line breaks are for display purposes only): 565 GET /authorize?type=user_agent&client_id=s6BhdRkqt3& 566 redirect_uri=https%3A%2F%2FEexample%2Ecom%2Frd HTTP/1.1 567 Host: server.example.com 569 If the client has previously registered a redirection URI with the 570 authorization server, the authorization server MUST verify that the 571 redirection URI received matches the registered URI associated with 572 the client identifier. 574 The authorization server authenticates the end-user and obtains an 575 authorization decision (by asking the end-user or establishing 576 approval via other means). The authorization server sends the end- 577 user's user-agent to the provided client redirection URI using an 578 HTTP redirection response. 580 3.5.1.1.1. End-user Grants Authorization 582 If the end-user authorizes the access request, the authorization 583 server issues an access token and delivers it to the client by adding 584 the following parameters, using the 585 "application/x-www-form-urlencoded" format as defined by 586 [W3C.REC-html40-19980424], to the redirection URI fragment: 588 access_token 589 REQUIRED. The access token. 591 expires_in 592 OPTIONAL. The duration in seconds of the access token 593 lifetime. 595 refresh_token 596 OPTIONAL. The refresh token. 598 state 599 REQUIRED if the "state" parameter was present in the client 600 authorization request. Set to the exact value received from 601 the client. 603 access_token_secret 604 REQUIRED if requested by the client. The corresponding access 605 token secret as requested by the client. 607 For example, the authorization server redirects the end-user's user- 608 agent by sending the following HTTP response: 610 HTTP/1.1 302 Found 611 Location: http://example.com/rd#access_token=FJQbwq9&expires_in=3600 613 3.5.1.1.2. End-user Denies Authorization 615 If the end-user denied the access request, the authorization server 616 responds to the client by adding the following parameters, using the 617 "application/x-www-form-urlencoded" format as defined by 618 [W3C.REC-html40-19980424], to the redirection URI fragment: 620 error 621 REQUIRED. The parameter value MUST be set to "user_denied". 623 state 624 REQUIRED if the "state" parameter was present in the client 625 authorization request. Set to the exact value received from 626 the client. 628 For example, the authorization server responds with the following: 630 HTTP/1.1 302 Found 631 Location: http://example.com/rd#error=user_denied 633 The authorization flow concludes unsuccessfully. To extract the 634 error message, the client follows the steps described in 635 Section 3.5.1.2. 637 3.5.1.2. Client Extracts Access Token 639 The user-agent follows the authorization server redirection response 640 by making an HTTP "GET" request to the URI received in the "Location" 641 HTTP response header. The user-agent SHALL NOT include the fragment 642 component with the request. 644 For example, the user-agent makes the following HTTP "GET" request in 645 response to the redirection directive received from the authorization 646 server: 648 GET /rd HTTP/1.1 649 Host: example.com 651 The HTTP response to the redirection request returns a web page 652 (typically an HTML page with an embedded script) capable of accessing 653 the full redirection URI including the fragment retained by the user- 654 agent, and extracting the access token (and other parameters) 655 contained in the fragment. 657 3.5.2. Web Server Flow 659 The web server flow is a user delegation flow suitable for clients 660 capable of interacting with the end-user's user-agent (typically a 661 web browser) and capable of receiving incoming requests from the 662 authorization server (capable of acting as an HTTP server). 664 +----------+ Client Identifier +---------------+ 665 | -+----(A)-- & Redirect URI ------->| | 666 | End-user | | Authorization | 667 | at |<---(B)-- User authenticates --->| Server | 668 | Browser | | | 669 | -+----(C)-- Verification Code ----<| | 670 +-|----|---+ +---------------+ 671 | | ^ v 672 (A) (C) | | 673 | | | | 674 ^ v | | 675 +---------+ | | 676 | |>---(D)-- Client Credentials, --------' | 677 | Web | Verification Code, | 678 | Client | & Redirect URI | 679 | | | 680 | |<---(E)------- Access Token -----------------' 681 +---------+ (w/ Optional Refresh Token) 683 Figure 4 685 The web server flow illustrated in Figure 4 includes the following 686 steps: 688 (A) The web client initiates the flow by redirecting the end-user's 689 user-agent to the authorization endpoint with its client 690 identifier and a redirect URI to which the authorization server 691 will send the end-user back once authorization is received (or 692 denied). 694 (B) The authorization server authenticates the end-user (via the 695 user-agent) and establishes whether the end-user grants or 696 denies the client's access request. 698 (C) Assuming the end-user granted access, the authorization server 699 redirects the user-agent back to the client to the redirection 700 URI provided earlier. The authorization includes a verification 701 code for the client to use to obtain an access token. 703 (D) The client requests an access token from the authorization 704 server by including its client credentials (identifier and 705 secret), as well as the verification code received in the 706 previous step. 708 (E) The authorization server validates the client credentials and 709 the verification code and responds back with the access token. 711 3.5.2.1. Client Requests Authorization 713 In order for the end-user to grant the client access, the client 714 sends the end-user to the authorization server. The client 715 constructs the request URI by adding the following URI query 716 parameters to the user authorization endpoint URI: 718 type 719 REQUIRED. The parameter value MUST be set to "web_server". 721 client_id 722 REQUIRED. The client identifier as described in Section 3.4. 724 redirect_uri 725 REQUIRED unless a redirection URI has been established between 726 the client and authorization server via other means. An 727 absolute URI to which the authorization server will redirect 728 the user-agent to when the end-user authorization step is 729 completed. The authorization server MAY require the client to 730 pre-register their redirection URI. The redirection URI MUST 731 NOT include a query component as defined by [RFC3986] section 3 732 if the "state" parameter is present. 734 state 735 OPTIONAL. An opaque value used by the client to maintain state 736 between the request and callback. The authorization server 737 includes this value when redirecting the user-agent back to the 738 client. 740 immediate 741 OPTIONAL. The parameter value must be set to "true" or 742 "false". If set to "true", the authorization server MUST NOT 743 prompt the end-user to authenticate or approve access. 744 Instead, the authorization server attempts to establish the 745 end-user's identity via other means (e.g. browser cookies) and 746 checks if the end-user has previously approved an identical 747 access request by the same client and if that access grant is 748 still active. If the authorization server does not support an 749 immediate check or if it is unable to establish the end-user's 750 identity or approval status, it MUST deny the request without 751 prompting the end-user. Defaults to "false" if omitted. 753 The client directs the end-user to the constructed URI using an HTTP 754 redirection response, or by other means available to it via the end- 755 user's user-agent. The request MUST use the HTTP "GET" method. 757 For example, the client directs the end-user's user-agent to make the 758 following HTTPS requests (line breaks are for display purposes only): 760 GET /authorize?type=web_server&client_id=s6BhdRkqt3&redirect_uri= 761 https%3A%2F%2Fclient%2Eexample%2Ecom%2Fcb HTTP/1.1 762 Host: server.example.com 764 If the client has previously registered a redirection URI with the 765 authorization server, the authorization server MUST verify that the 766 redirection URI received matches the registered URI associated with 767 the client identifier. 769 The authorization server authenticates the end-user and obtains an 770 authorization decision (by asking the end-user or establishing 771 approval via other means). The authorization server sends the end- 772 user's user-agent to the provided client redirection URI using an 773 HTTP redirection response, or by other means available to it via the 774 end-user's user-agent. 776 3.5.2.1.1. End-user Grants Authorization 778 If the end-user authorizes the access request, the authorization 779 server generates a verification code and associates it with the 780 client identifier and redirection URI. The authorization server 781 constructs the request URI by adding the following parameters to the 782 query component of redirection URI provided by the client: 784 code 785 REQUIRED. The verification code generated by the authorization 786 server. 788 state 789 REQUIRED if the "state" parameter was present in the client 790 authorization request. Set to the exact value received from 791 the client. 793 The verification code should expire shortly after it is issued and 794 allowed for a single use. 796 For example, the authorization server redirects the end-user's user- 797 agent by sending the following HTTP response: 799 HTTP/1.1 302 Found 800 Location: https://client.example.com/cb?code=i1WsRn1uB1 802 In turn, the end-user's user-agent makes the following HTTPS "GET" 803 request: 805 GET /cb?code=i1WsRn1uB1 HTTP/1.1 806 Host: client.example.com 808 3.5.2.1.2. End-user Denies Authorization 810 If the end-user denied the access request, the authorization server 811 constructs the request URI by adding the following parameters to the 812 query component of the redirection URI provided by the client: 814 error 815 REQUIRED. The parameter value MUST be set to "user_denied". 817 state 818 REQUIRED if the "state" parameter was present in the client 819 authorization request. Set to the exact value received from 820 the client. 822 For example, the authorization server directs the client to make the 823 following HTTP request: 825 GET /cb?error=user_denied HTTP/1.1 826 Host: client.example.com 828 The authorization flow concludes unsuccessfully. 830 3.5.2.2. Client Requests Access Token 832 The client obtains an access token from the authorization server by 833 making an HTTP "POST" request to the token endpoint. The client 834 constructs a request URI by adding the following parameters to the 835 request: 837 type 838 REQUIRED. The parameter value MUST be set to "web_server". 840 client_id 841 REQUIRED. The client identifier as described in Section 3.4. 843 client_secret 844 REQUIRED if the client identifier has a matching secret. The 845 client secret as described in Section 3.4. 847 code 848 REQUIRED. The verification code received from the 849 authorization server. 851 redirect_uri 852 REQUIRED. The redirection URI used in the initial request. 854 secret_type 855 OPTIONAL. The access token secret type as described by 856 Section 5.3. If omitted, the authorization server will issue a 857 bearer token (an access token without a matching secret) as 858 described by Section 5.2. 860 For example, the client makes the following HTTPS request (line 861 breaks are for display purposes only): 863 POST /token HTTP/1.1 864 Host: server.example.com 865 Content-Type: application/x-www-form-urlencoded 867 type=web_server&client_id=s6BhdRkqt3& 868 client_secret=gX1fBat3bV&code=i1WsRn1uB1& 869 redirect_uri=https%3A%2F%2Fclient%2Eexample%2Ecom%2Fcb 871 The authorization server MUST verify that the verification code, 872 client identity, client secret, and redirection URI are all valid and 873 match its stored association. If the request is valid, the 874 authorization server issues an access token and delivers it to the 875 client in the HTTP response body using the 876 "application/x-www-form-urlencoded" content type as defined by 877 [W3C.REC-html40-19980424] with a 200 status code (OK). 879 The response contains the following parameters: 881 access_token 882 REQUIRED. The access token issued by the authorization server. 884 expires_in 885 OPTIONAL. The duration in seconds of the access token 886 lifetime. 888 refresh_token 889 OPTIONAL. The refresh token used to obtain new access tokens 890 using the same end-user access grant as described in Section 4. 892 access_token_secret 893 REQUIRED if requested by the client. The corresponding access 894 token secret as requested by the client. 896 For example: 898 HTTP/1.1 200 OK 899 Content-Type: application/x-www-form-urlencoded 901 access_token=SlAV32hkKG&expires_in=3600&refresh_token=8xLOxBtZp8 903 If the request is invalid, the authorization server returns an error 904 message in the HTTP response body using the 905 "application/x-www-form-urlencoded" content type as defined by 906 [W3C.REC-html40-19980424] with a 400 status code (Bad Request). 908 The response contains the following parameter: 910 error 911 OPTIONAL. The parameter value MUST be set to either 912 "redirect_uri_mismatch", "bad_verification_code", 913 "incorrect_client_credentials". 915 For example: 917 HTTP/1.1 400 Bad Request 918 Content-Type: application/x-www-form-urlencoded 920 error=bad_verification_code 922 3.5.3. Device Flow 924 The device flow is a user delegation flow suitable for clients 925 executing on devices which do not have an easy data-entry method 926 (e.g. game consoles or media hub), but where the end-user has 927 separate access to a user-agent on another computer or device (e.g. 928 home computer, a laptop, or a smartphone). The client is incapable 929 of receiving incoming requests from the authorization server 930 (incapable of acting as an HTTP server). 932 Instead of interacting with the end-user's user-agent, the client 933 instructs the end-user to use another computer or device and connect 934 to the authorization server to approve the access request. Since the 935 client cannot receive incoming requests, it polls the authorization 936 server repeatedly until the end-user completes the approval process. 938 This device flow does not utilize the client secret since the client 939 executables reside on a local device which makes the client secret 940 accessible and exploitable. 942 +----------+ +----------------+ 943 | |>---(A)-- Client Identifier --->| | 944 | | | | 945 | |<---(B)-- Verification Code, --<| | 946 | | User Code, | | 947 | | & Verification URI | | 948 | Device | | | 949 | Client | Client Identifier & | | 950 | |>---(E)-- Verification Code --->| | 951 | | ... | | 952 | |>---(E)---> | | 953 | | | Authorization | 954 | |<---(F)-- Access Token --------<| Server | 955 +----------+ (w/ Optional Refresh Token) | | 956 v | | 957 : | | 958 (C) User Code & Verification URI | | 959 : | | 960 v | | 961 +----------+ | | 962 | End-user | | | 963 | at |<---(D)-- User authenticates -->| | 964 | Browser | | | 965 +----------+ +----------------+ 967 Figure 5 969 The device flow illustrated in Figure 5 includes the following steps: 971 (A) The client requests access from the authorization server and 972 includes its client identifier in the request. 974 (B) The authorization server issues a verification code, a user 975 code, and provides the end-user authorization URI. 977 (C) The client instructs the end-user to use its user-agent 978 (elsewhere) and visit the provided authorization URI. The 979 client provides the user with the user code to enter in order to 980 grant access. 982 (D) The authorization server authenticates the end-user (via the 983 user-agent) and prompts the end-user to grant the client's 984 access request by entering the user code provided by the client. 986 (E) While the end-user authorizes (or denies) the client's request 987 (D), the client repeatedly polls the authorization server to 988 find out if the end-user completed the user authorization step. 989 The client includes the verification code and its client 990 identifier. 992 (F) Assuming the end-user granted access, the authorization server 993 validates the verification code provided by the client and 994 responds back with the access token. 996 3.5.3.1. Client Requests Authorization 998 The client initiates the flow by requesting a set of verification 999 codes from the authorization server by making an HTTP "GET" request 1000 to the token endpoint. The client constructs a request URI by adding 1001 the following parameters to the request: 1003 type 1004 REQUIRED. The parameter value MUST be set to "device_code". 1006 client_id 1007 REQUIRED. The client identifier as described in Section 3.4. 1009 For example, the client makes the following HTTPS request (line 1010 breaks are for display purposes only): 1012 GET /token?type=device_code&client_id=s6BhdRkqt3 1013 HTTP/1.1 1014 Host: server.example.com 1016 In response, the authorization server generates a verification code 1017 and a user code and includes them in the HTTP response body using the 1018 "application/x-www-form-urlencoded" format as defined by 1019 [W3C.REC-html40-19980424] with a 200 status code (OK). The response 1020 contains the following parameters: 1022 code 1023 REQUIRED. The verification code. 1025 user_code 1026 REQUIRED. The user code. 1028 user_uri 1029 REQUIRED. The user authorization URI on the authorization 1030 server. 1032 expires_in 1033 OPTIONAL. The duration in seconds of the verification code 1034 lifetime. 1036 interval 1037 OPTIONAL. The minimum amount of time in seconds that the 1038 client SHOULD wait between polling requests to the token 1039 endpoint. 1041 For example (line breaks are for display purposes only): 1043 HTTP/1.1 200 OK 1044 Content-Type: application/x-www-form-urlencoded 1046 code=74tq5miHKB&user_code=94248&user_uri=http%3A%2F%2 1047 Fwww%2Eexample%2Ecom%2Fdevice&interval=5 1049 The client displays the user code and the user authorization URI to 1050 the end-user, and instructs the end-user to visit the URI using a 1051 user-agent and enter the user code. 1053 The end-user manually types the provided URI and authenticates with 1054 the authorization server. The authorization server prompts the end- 1055 user to authorize the client's request by entering the user code 1056 provided by the client. Once the end-user approves or denies the 1057 request, the authorization server informs the end-user to return to 1058 the device for further instructions. 1060 3.5.3.2. Client Requests Access Token 1062 Since the client is unable to receive incoming requests from the 1063 authorization server, it polls the authorization server repeatedly 1064 until the end-user grants or denies the request, or the verification 1065 code expires. 1067 The client makes the following request at an arbitrary but reasonable 1068 interval which MUST NOT exceed the minimum interval rate provided by 1069 the authorization server (if present via the "interval" parameter). 1070 Alternatively, the client MAY provide a user interface for the end- 1071 user to manually inform it when authorization was granted. 1073 The client requests an access token by making an HTTP "GET" request 1074 to the token endpoint. The client constructs a request URI by adding 1075 the following parameters to the request: 1077 type 1078 REQUIRED. The parameter value MUST be set to "device_token". 1080 client_id 1081 REQUIRED. The client identifier as described in Section 3.4. 1083 code 1084 The verification code received from the authorization server. 1086 secret_type 1087 OPTIONAL. The access token secret type as described by 1088 Section 5.3. If omitted, the authorization server will issue a 1089 bearer token (an access token without a matching secret) as 1090 described by Section 5.2. 1092 For example, the client makes the following HTTPS request (line 1093 breaks are for display purposes only): 1095 GET /token?type=device_token&client_id=s6BhdRkqt3 1096 &code=J2vC42OifV HTTP/1.1 1097 Host: server.example.com 1099 3.5.3.2.1. End-user Grants Authorization 1101 If the end-user authorized the request, the authorization server 1102 issues an access token and delivers it to the client by including it 1103 in the HTTP response body using the 1104 "application/x-www-form-urlencoded" content type as defined by 1105 [W3C.REC-html40-19980424] with a 200 status code (OK). The response 1106 contains the following parameters: 1108 access_token 1109 REQUIRED. The access token. 1111 expires_in 1112 OPTIONAL. The duration in seconds of the access token 1113 lifetime. 1115 refresh_token 1116 OPTIONAL. The refresh token. 1118 access_token_secret 1119 REQUIRED if requested by the client. The corresponding access 1120 token secret as requested by the client. 1122 For example: 1124 HTTP/1.1 200 OK 1125 Content-Type: application/x-www-form-urlencoded 1127 access_token=FJQbwq9OD8&expires_in=3600 1129 3.5.3.2.2. End-user Denies Authorization 1131 If the end-user denied the request, the authorization server provides 1132 the client with the error message in the HTTP response body using the 1133 "application/x-www-form-urlencoded" content type as defined by 1134 [W3C.REC-html40-19980424] with a 400 status code (Bad Request). The 1135 response contains the following parameters: 1137 error 1138 REQUIRED. Value must be set to "authorization_declined". 1140 For example: 1142 HTTP/1.1 400 Bad Request 1143 Content-Type: application/x-www-form-urlencoded 1145 error=authorization_declined 1147 3.5.3.2.3. End-user Authorization Pending or Expired 1149 If the end-user authorization is pending or expired without receiving 1150 any response from the end-user, or the client is exceeding the 1151 allowed polling interval, the authorization server provides the 1152 client with the error message in the HTTP response body using the 1153 "application/x-www-form-urlencoded" content type as defined by 1155 [W3C.REC-html40-19980424] with a 400 status code (Bad Request). The 1156 response contains the following parameters: 1158 error 1159 REQUIRED. Value MUST be set to "authorization_pending", 1160 "slow_down", or "code_expired". 1162 For example: 1164 HTTP/1.1 400 Bad Request 1165 Content-Type: application/x-www-form-urlencoded 1167 error=authorization_pending 1169 3.6. End-user Credentials Flows 1171 End-user credential flows are used to grant client access to 1172 protected resources by the end-user directly sharing the end-user's 1173 username and password with the client. Unlike user delegation flows, 1174 end-user credentials flows require a much higher degree of trust 1175 between the client and end-user. 1177 These flows are suitable in cases where the end-user already has a 1178 trust relationship with the client, such as its computer operating 1179 system or highly privileged applications. Authorization servers 1180 SHOULD take special care when enabling user credentials flows, and 1181 SHOULD only do so when other delegation flows are not viable. 1183 However, unlike the HTTP Basic authentication scheme defined in 1184 [RFC2617], the end-user's credentials are used in a single request 1185 and are exchanged for an access token and refresh token which 1186 eliminates the client need to store them for future use. 1188 3.6.1. Username and Password Flow 1190 The username and password flow is an end-user credentials flow 1191 suitable for clients capable of asking end users for their usernames 1192 and passwords. It is also used to migrate existing clients using 1193 direct authentication schemes such as HTTP Basic or Digest 1194 authentication to OAuth by converting the end-user credentials stored 1195 with tokens. 1197 The methods through which the client prompts end users for their 1198 usernames and passwords is beyond the scope of this specification. 1199 The client MUST discard the usernames and passwords once an access 1200 token has been obtained. 1202 End-user 1203 v 1204 : 1205 (A) 1206 : 1207 v 1208 +--------+ +---------------+ 1209 | | Client Credentials | | 1210 | |>--(B)--- & User Credentials ---->| Authorization | 1211 | Client | | Server | 1212 | |<--(C)---- Access Token ---------<| | 1213 | | (w/ Optional Refresh Token) | | 1214 +--------+ +---------------+ 1216 Figure 6 1218 The username and password flow illustrated in Figure 6 includes the 1219 following steps: 1221 (A) The end-user provides the client with its username and password. 1223 (B) The client sends an access token request to the authorization 1224 server and includes its client identifier and client secret, and 1225 the end-user's username and password. 1227 (C) The authorization server validates the end-user credentials and 1228 the client credentials and issues an access token. 1230 3.6.1.1. Client Requests Access Token 1232 The client requests an access token by making an HTTP "POST" request 1233 to the token endpoint. The client constructs a request URI by adding 1234 the following parameters to the request: 1236 type 1237 REQUIRED. The parameter value MUST be set to "username". 1239 client_id 1240 REQUIRED. The client identifier as described in Section 3.4. 1242 client_secret 1243 REQUIRED. The client secret as described in Section 3.4. 1244 OPTIONAL if no client secret was issued. 1246 username 1247 REQUIRED. The end-user's username. 1249 password 1250 REQUIRED. The end-user's password. 1252 secret_type 1253 OPTIONAL. The access token secret type as described by 1254 Section 5.3. If omitted, the authorization server will issue a 1255 bearer token (an access token without a matching secret) as 1256 described by Section 5.2. 1258 For example, the client makes the following HTTPS request (line 1259 breaks are for display purposes only): 1261 POST /token HTTP/1.1 1262 Host: server.example.com 1264 type=username&client_id=s6BhdRkqt3&client_secret= 1265 47HDu8s&username=johndoe&password=A3ddj3w 1267 The authorization server MUST validate the client credentials and 1268 end-user credentials and if valid issue an access token and deliver 1269 to the client in the HTTP response body using the 1270 "application/x-www-form-urlencoded" content type as defined by 1271 [W3C.REC-html40-19980424] with a 200 status code (OK). 1273 The response contains the following parameters: 1275 access_token 1276 REQUIRED. The access token. 1278 expires_in 1279 OPTIONAL. The duration in seconds of the access token 1280 lifetime. 1282 refresh_token 1283 OPTIONAL. The refresh token. 1285 access_token_secret 1286 REQUIRED if requested by the client. The corresponding access 1287 token secret as requested by the client. 1289 For example: 1291 HTTP/1.1 200 OK 1292 Content-Type: application/x-www-form-urlencoded 1294 access_token=FJQbwq9OD8&refresh_token=gO3CHNqpH8 1296 If the request is invalid, the authorization server returns an error 1297 message in the HTTP response body using the 1298 "application/x-www-form-urlencoded" content type as defined by 1299 [W3C.REC-html40-19980424] with a 400 status code (Bad Request). 1301 The response contains the following parameter: 1303 error 1304 OPTIONAL. The parameter value MUST be set to either 1305 "incorrect_client_credentials" or "unauthorized_client" (the 1306 client is not permitted to use this flow). 1308 For example: 1310 HTTP/1.1 400 Bad Request 1311 Content-Type: application/x-www-form-urlencoded 1313 error=incorrect_client_credentials 1315 3.7. Autonomous Client Flows 1317 Autonomous client flows are used to grant client access to protected 1318 resources controlled by the client (i.e. the client is the resource 1319 owner). For example, these flows are useful when a service provides 1320 both client-specific resources in addition to end-user resources. 1322 3.7.1. Client Credentials Flow 1324 The client credentials flow is used when the client acts autonomously 1325 without acting on behalf of a separate resource owner. The client 1326 secret is assumed to be high-entropy since it is not designed to be 1327 memorized by an end-user. 1329 +--------+ +---------------+ 1330 | | | | 1331 | |>--(A)--- Client Credentials ---->| Authorization | 1332 | Client | | Server | 1333 | |<--(B)---- Access Token ---------<| | 1334 | | (w/ Optional Refresh Token) | | 1335 +--------+ +---------------+ 1337 Figure 7 1339 The client credential flow illustrated in Figure 7 includes the 1340 following steps: 1342 (A) The client sends an access token request to the authorization 1343 server and includes its client identifier and client secret. 1345 (B) The authorization server validates the client credentials and 1346 issues an access token. 1348 3.7.1.1. Client Requests Access Token 1350 The client requests an access token by making an HTTP "POST" request 1351 to the token endpoint. The client constructs a request URI by adding 1352 the following parameters to the request: 1354 type 1355 REQUIRED. The parameter value MUST be set to 1356 "client_credentials". 1358 client_id 1359 REQUIRED. The client identifier as described in Section 3.4. 1361 client_secret 1362 REQUIRED. The client secret as described in Section 3.4. 1364 secret_type 1365 OPTIONAL. The access token secret type as described by 1366 Section 5.3. If omitted, the authorization server will issue a 1367 bearer token (an access token without a matching secret) as 1368 described by Section 5.2. 1370 For example, the client makes the following HTTPS request (line 1371 breaks are for display purposes only): 1373 POST /token HTTP/1.1 1374 Host: server.example.com 1376 type=client_credentials&client_id=s6BhdRkqt3&client_secret=47HDu8s 1378 The authorization server MUST validate the client credentials and if 1379 valid issue an access token and deliver to the client in the HTTP 1380 response body using the "application/x-www-form-urlencoded" content 1381 type as defined by [W3C.REC-html40-19980424] with a 200 status code 1382 (OK). 1384 The response contains the following parameters: 1386 access_token 1387 REQUIRED. The access token. 1389 expires_in 1390 OPTIONAL. The duration in seconds of the access token 1391 lifetime. 1393 refresh_token 1394 OPTIONAL. The refresh token. 1396 access_token_secret 1397 REQUIRED if requested by the client. The corresponding access 1398 token secret as requested by the client. 1400 For example: 1402 HTTP/1.1 200 OK 1403 Content-Type: application/x-www-form-urlencoded 1405 access_token=FJQbwq9OD8 1407 If the request is invalid, the authorization server returns an error 1408 message in the HTTP response body using the 1409 "application/x-www-form-urlencoded" content type as defined by 1410 [W3C.REC-html40-19980424] with a 400 status code (Bad Request). 1412 The response contains the following parameter: 1414 error 1415 OPTIONAL. The parameter value MUST be set to 1416 "incorrect_client_credentials". 1418 For example: 1420 HTTP/1.1 400 Bad Request 1421 Content-Type: application/x-www-form-urlencoded 1423 error=incorrect_client_credentials 1425 3.7.2. Assertion Flow 1427 The assertion flow is used when a client wishes to exchange an 1428 existing security token or assertion for an access token. This flow 1429 is suitable when the client is acting autonomously or on behalf of 1430 the end-user (based on the content of the assertion used). 1432 The assertion flow requires the client to obtain a assertion (such as 1433 a SAML [OASIS.saml-core-2.0-os] assertion) from an assertion issuer 1434 or to self-issue an assertion prior to initiating the flow. The 1435 assertion format, the process by which the assertion is obtained, and 1436 the method of validating the assertion are defined by the assertion 1437 issuer and the authorization server, and are beyond the scope of this 1438 specification. 1440 The client credentials flow is used when the client acts autonomously 1441 without acting on behalf of a separate resource owner. 1443 +--------+ +---------------+ 1444 | | | | 1445 | |>--(A)------ Assertion ---------->| Authorization | 1446 | Client | | Server | 1447 | |<--(B)---- Access Token ---------<| | 1448 | | | | 1449 +--------+ +---------------+ 1451 Figure 8 1453 The client credential flow illustrated in Figure 8 includes the 1454 following steps: 1456 (A) The client sends an access token request to the authorization 1457 server and includes an assertion. 1459 (B) The authorization server validates the assertion and issues an 1460 access token. 1462 3.7.2.1. Client Requests Access Token 1464 The client requests an access token by making an HTTP "POST" request 1465 to the token endpoint. The client constructs a request URI by adding 1466 the following parameters to the request: 1468 type 1469 REQUIRED. The parameter value MUST be set to "assertion". 1471 format 1472 REQUIRED. The format of the assertion as defined by the 1473 authorization server. The value MUST be an absolute URI. 1475 assertion 1476 REQUIRED. The assertion. 1478 secret_type 1479 OPTIONAL. The access token secret type as described by 1480 Section 5.3. If omitted, the authorization server will issue a 1481 bearer token (an access token without a matching secret) as 1482 described by Section 5.2. 1484 For example, the client makes the following HTTPS request (line 1485 breaks are for display purposes only): 1487 POST /token HTTP/1.1 1488 Host: server.example.com 1490 type=assertion&format=_______&assertion=_______ 1492 The authorization server MUST validate the assertion and if valid 1493 issue an access token and deliver to the client in the HTTP response 1494 body using the "application/x-www-form-urlencoded" content type as 1495 defined by [W3C.REC-html40-19980424] with a 200 status code (OK). 1497 The response contains the following parameters: 1499 access_token 1500 REQUIRED. The access token. 1502 expires_in 1503 OPTIONAL. The duration in seconds of the access token 1504 lifetime. 1506 access_token_secret 1507 REQUIRED if requested by the client. The corresponding access 1508 token secret as requested by the client. 1510 For example: 1512 HTTP/1.1 200 OK 1513 Content-Type: application/x-www-form-urlencoded 1515 access_token=FJQbwq9OD8 1517 If the assertion is invalid, the authorization server returns an 1518 error message in the HTTP response body using the 1519 "application/x-www-form-urlencoded" content type as defined by 1520 [W3C.REC-html40-19980424] with a 400 status code (Bad Request). 1522 The response contains the following parameter: 1524 error 1525 OPTIONAL. The parameter value MUST be set to either 1526 "invalid_assertion" or "unknown_format". 1528 For example: 1530 HTTP/1.1 400 Bad Request 1531 Content-Type: application/x-www-form-urlencoded 1533 error=incorrect_credentials 1535 Authorization servers SHOULD issue access tokens with a limited 1536 lifetime and require clients to refresh them by requesting a new 1537 access token using the same assertion if it is still valid. 1538 Otherwise the client MUST obtain a new valid assertion. 1540 4. Refreshing an Access Token 1542 Token refresh is used when the lifetime of an access token is shorter 1543 than the lifetime of the authorization grant. It allows clients to 1544 obtain a new access token without having to go through the 1545 authorization flow again or involve the resource owner. It is also 1546 used to obtain a new token with different security properties (e.g. 1548 bearer token, token with shared symmetric secret). 1550 +--------+ Client Credentials, +---------------+ 1551 | | Refresh Token, | | 1552 | |>--(A)----- & Secret Type ------->| Authorization | 1553 | Client | | Server | 1554 | |<--(B)----- Access Token --------<| | 1555 | | & Optional Secret | | 1556 +--------+ +---------------+ 1558 Figure 9 1560 To refresh a token, the client constructs an HTTP "POST" request to 1561 the token endpoint and includes the following parameters in the HTTP 1562 request body using the "application/x-www-form-urlencoded" content 1563 type as defined by [W3C.REC-html40-19980424]: 1565 type 1566 REQUIRED. The parameter value MUST be set to "refresh". 1568 client_id 1569 REQUIRED. The client identifier as described in Section 3.4. 1571 client_secret 1572 REQUIRED if the client was issued a secret. The client secret. 1574 refresh_token 1575 REQUIRED. The refresh token associated with the access token 1576 to be refreshed. 1578 secret_type 1579 OPTIONAL. The access token secret type as described by 1580 Section 5.3. If omitted, the authorization server will issue a 1581 bearer token (an access token without a matching secret) as 1582 described by Section 5.2. 1584 For example, the client makes the following HTTPS request (line break 1585 are for display purposes only): 1587 POST /token HTTP/1.1 1588 Host: server.example.com 1589 Content-Type: application/x-www-form-urlencoded 1591 type=refresh_token&client_id=s6BhdRkqt3&client_secret=8eSEIpnqmM 1592 &refresh_token=n4E9O119d&secret_type=hmac-sha256 1594 The authorization server MUST verify the client credential, the 1595 validity of the refresh token, and that the resource owner's 1596 authorization is still valid. If the request is valid, the 1597 authorization server issues a new access token and includes the 1598 following parameters in the HTTP response body using the 1599 "application/x-www-form-urlencoded" content type as defined by 1600 [W3C.REC-html40-19980424] with a 200 status code (OK): 1602 access_token 1603 REQUIRED. The access token. 1605 expires_in 1606 OPTIONAL. The duration in seconds of the access token 1607 lifetime. 1609 access_token_secret 1610 REQUIRED if requested by the client. The corresponding access 1611 token secret as requested by the client. 1613 For example: 1615 HTTP/1.1 200 OK 1616 Content-Type: application/x-www-form-urlencoded 1618 access_token=8F44J2HGMl&access_token_secret=hfd83hjd&expires_in=3600 1620 If the request fails verification, the authorization server returns 1621 an error message in the HTTP response body using the 1622 "application/x-www-form-urlencoded" content type as defined by 1623 [W3C.REC-html40-19980424] with a 400 status code (Bad Request). 1625 The response contains the following parameter: 1627 error 1628 OPTIONAL. The parameter value MUST be set to either 1629 "incorrect_credentials", "authorization_expired", or 1630 "unsupported_secret_type". 1632 For example: 1634 HTTP/1.1 400 Bad Request 1635 Content-Type: application/x-www-form-urlencoded 1637 error=incorrect_credentials 1639 5. Accessing a Protected Resource 1641 Clients access protected resources by presenting an access token to 1642 the resource server. The methods used by the resource server to 1643 validate the access token are beyond the scope of this specification, 1644 but generally involve an interaction or coordination between the 1645 resource server and authorization server. 1647 The method in which a client uses an access token depends on the 1648 security properties of the access tokens. By default, access tokens 1649 are issued without a matching secret. Clients MAY request an access 1650 token with a matching secret by specifying the desired secret type 1651 using the "secret_type" token request parameter. 1653 When an access token does not include a matching secret, the access 1654 token acts as a bearer token, where the token string is a shared 1655 symmetric secret. This requires treating the access token with the 1656 same care as other secrets (e.g. user passwords). Access tokens 1657 SHOULD NOT be sent in the clear over an insecure channel. 1659 However, when it is necessary to transmit bearer tokens in the clear 1660 without a secure channel, authorization servers SHOULD issue access 1661 tokens with limited scope and lifetime to reduce the potential risk 1662 from a compromised access token. Clients SHOULD request and utilize 1663 an access token with a matching secret when making protected resource 1664 requests over an insecure channel (e.g. an HTTP request without using 1665 TLS/SSL). 1667 When an access token includes a matching secret, the secret is not 1668 included directly in the request but is used instead to generate a 1669 cryptographic signature of the request. The signature can only be 1670 generated and verified by entities with access to the secret. 1672 Clients SHOULD NOT make authenticated requests with an access token 1673 to unfamiliar resource servers, especially when using bearer tokens, 1674 regardless of the presence of a secure channel. 1676 5.1. The Authorization Request Header 1678 The "Authorization" request header field is used by clients to make 1679 both bearer token and cryptographic token requests. When making 1680 bearer token requests, the client uses the "token" attribute to 1681 include the access token in the request without any of the other 1682 attributes. Additional methods for making bearer token requests are 1683 described in Section 5.2. 1685 For example: 1687 GET /resource HTTP/1.1 1688 Host: server.example.com 1689 Authorization: Token token="vF9dft4qmT" 1691 When making a cryptographic token request (using an access token with 1692 a matching secret) the client uses the "token" attribute to include 1693 the access token in the request, and uses the "nonce", "timestamp", 1694 "algorithm", and "signature" attributes to apply the matching secret. 1696 For example: 1698 GET /resource HTTP/1.1 1699 Host: server.example.com 1700 Authorization: Token token="vF9dft4qmT", 1701 nonce="s8djwd", 1702 timestamp="137131200", 1703 algorithm="hmac-sha256", 1704 signature="wOJIO9A2W5mFwDgiDvZbTSMK/PY=" 1706 The "Authorization" header field uses the framework defined by 1707 [RFC2617] as follows: 1709 credentials = "Token" RWS token-response 1711 token-response = token-id 1712 [ CS nonce ] 1713 [ CS timestamp ] 1714 [ CS algorithm ] 1715 [ CS signature ] 1717 token-id = "token" "=" <"> token <"> 1718 timestamp = "timestamp" "=" <"> 1*DIGIT <"> 1719 nonce = "nonce" "=" <"> token <"> 1721 algorithm = "algorithm" "=" algorithm-name 1722 algorithm-name = "hmac-sha256" / 1723 token 1725 signature = "signature" "=" <"> token <"> 1727 5.2. Bearer Token Requests 1729 Clients make bearer token requests by including the access token 1730 using the HTTP "Authorization" request header with the "Token" 1731 authentication scheme as described in Section 5.1. The access token 1732 is included using the "token" parameter. 1734 For example, the client makes the following HTTPS request: 1736 GET /resource HTTP/1.1 1737 Host: server.example.com 1738 Authorization: Token token="vF9dft4qmT" 1740 The resource server MUST validate the access token and ensure it has 1741 not expired and that its scope covers the requested resource. If the 1742 token expired or is invalid, the resource server MUST reply with an 1743 HTTP 401 status code (Unauthorized) and include the HTTP 1744 "WWW-Authenticate" response header as described in Section 6.1. 1746 For example: 1748 HTTP/1.1 401 Unauthorized 1749 WWW-Authenticate: Token realm='Service', error='token_expired' 1751 Alternatively, the client MAY include the access token using the HTTP 1752 request URI in the query component as described in Section 5.2.1, or 1753 in the HTTP body when using the "application/x-www-form-urlencoded" 1754 content type as described in Section 5.2.2. Clients SHOULD only use 1755 the request URI or body when the "Authorization" request header is 1756 not available, and MUST NOT use more than one method in each request. 1758 5.2.1. URI Query Parameter 1760 When including the access token in the HTTP request URI, the client 1761 adds the access token to the request URI query component as defined 1762 by [RFC3986] using the "oauth_token" parameter. 1764 For example, the client makes the following HTTPS request: 1766 GET /resource?oauth_token=vF9dft4qmT HTTP/1.1 1767 Host: server.example.com 1769 The HTTP request URI query can include other request-specific 1770 parameters, in which case, the "oauth_token" parameters SHOULD be 1771 appended following the request-specific parameters, properly 1772 separated by an "&" character (ASCII code 38). 1774 The resource server MUST validate the access token and ensure it has 1775 not expired and its scope includes the requested resource. If the 1776 resource expired or is not valid, the resource server MUST reply with 1777 an HTTP 401 status code (Unauthorized) and include the HTTP 1778 "WWW-Authenticate" response header as described in Section 6.1. 1780 5.2.2. Form-Encoded Body Parameter 1782 When including the access token in the HTTP request entity-body, the 1783 client adds the access token to the request body using the 1784 "oauth_token" parameter. The client can use this method only if the 1785 following REQUIRED conditions are met: 1787 o The entity-body is single-part. 1789 o The entity-body follows the encoding requirements of the 1790 "application/x-www-form-urlencoded" content-type as defined by 1791 [W3C.REC-html40-19980424]. 1793 o The HTTP request entity-header includes the "Content-Type" header 1794 field set to "application/x-www-form-urlencoded". 1796 o The HTTP request method is "POST", "PUT", or "DELETE". 1798 The entity-body can include other request-specific parameters, in 1799 which case, the "oauth_token" parameters SHOULD be appended following 1800 the request-specific parameters, properly separated by an "&" 1801 character (ASCII code 38). 1803 For example, the client makes the following HTTPS request: 1805 POST /resource HTTP/1.1 1806 Host: server.example.com 1807 Content-Type: application/x-www-form-urlencoded 1809 oauth_token=vF9dft4qmT 1811 The resource server MUST validate the access token and ensure it has 1812 not expired and its scope includes the requested resource. If the 1813 resource expired or is not valid, the resource server MUST reply with 1814 an HTTP 401 status code (Unauthorized) and include the HTTP 1815 "WWW-Authenticate" response header as described in Section 6.1. 1817 5.3. Cryptographic Tokens Requests 1819 Clients make authenticated protected resource requests using an 1820 access token with a matching secret by calculating a set of values 1821 and including them in the request using the "Authorization" header 1822 field. The way clients calculate these values depends on the access 1823 token secret type as issued by the authorization server. 1825 This specification defines the "hmac-sha256" algorithm, and 1826 establishes a registry for providing additional algorithms. Clients 1827 obtain an access token with a matching "hmac-sha256" secret by using 1828 the "token_type" parameter when requesting an access token. 1830 5.3.1. The 'hmac-sha256' Algorithm 1832 The "hmac-sha256" algorithm uses the HMAC method as defined in 1833 [RFC2104] together with the SHA-256 hash function defined in [NIST 1834 FIPS-180-3] to apply the access token secret to the request and 1835 generate a signature value that is included in the request instead of 1836 transmitting the secret in the clear. 1838 To use the "hmac-sha256" algorithm, clients: 1840 1. Calculate the request timestamp and generate a request nonce as 1841 described in Section 5.3.1.1. 1843 2. Construct the normalized request string as described in 1844 Section 5.3.1.2. 1846 3. Calculate the request signature as described in Section 5.3.1.3. 1848 4. Include the timestamp, nonce, algorithm name, and calculated 1849 signature in the request using the "Authorization" header field. 1851 For example: 1853 GET /resource HTTP/1.1 1854 Host: server.example.com 1855 Authorization: Token token="vF9dft4qmT", 1856 nonce="s8djwd", 1857 timestamp="137131200", 1858 algorithm="hmac-sha256", 1859 signature="wOJIO9A2W5mFwDgiDvZbTSMK/PY=" 1861 The resource server MUST validate the access token and ensure it has 1862 not expired and that its scope covers the requested resource. The 1863 resource server MUST also recalculate the request signature using the 1864 attributes provided by the client and compare it to the signature 1865 provided. If the token expired or is invalid, or if the signature is 1866 incorrect, the resource server MUST reply with an HTTP 401 status 1867 code (Unauthorized) and include the HTTP "WWW-Authenticate" response 1868 header as described in Section 6.1. 1870 For example: 1872 HTTP/1.1 401 Unauthorized 1873 Date: Tue, 15 Nov 2010 08:12:31 GMT 1874 WWW-Authenticate: Token realm='Service', 1875 algorithms='hmac-sha256', 1876 error='invalid_signature' 1878 [[ Errors list ]] 1880 5.3.1.1. Nonce and Timestamp 1882 A timestamp in combination with unique nonce values is used to 1883 protect against replay attacks when transmitted over an insecure 1884 channel. 1886 The nonce is a random string, uniquely generated by the client to 1887 allow the resource server to verify that a request has never been 1888 made before and helps prevent replay attacks when requests are made 1889 over a non-secure channel. The nonce value MUST be unique across all 1890 requests with the same timestamp and token combinations. 1892 The timestamp value is the current time expressed in the number of 1893 seconds since January 1, 1970 00:00:00 GMT, and MUST be a positive 1894 integer. 1896 To avoid the need to retain an infinite number of nonce values for 1897 future checks, resource servers MAY choose to restrict the time 1898 period after which a request with an old timestamp is rejected. When 1899 resource servers apply such a restriction, clients SHOULD synchronize 1900 their clocks by using the resource server's time as indicated by the 1901 HTTP "Date" response header field as defined in [RFC2616]. 1903 5.3.1.2. Normalized String Construction 1905 The normalized request string is a consistent, reproducible 1906 concatenation of several of the HTTP request elements into a single 1907 string. The string is used as an input to the selected cryptographic 1908 method and includes the HTTP request method (e.g. "GET", "POST", 1909 etc.), the authority as declared by the HTTP "Host" request header, 1910 and the request resource URI. 1912 The normalized request string does not cover the entire HTTP request. 1913 Most notably, it does not include the entity-body or most HTTP 1914 entity-headers. It is important to note that the resource server 1915 cannot verify the authenticity of the excluded request elements 1916 without using additional protections such as TLS/SSL. 1918 The normalized request string is constructed by concatenating 1919 together, in order, the following HTTP request elements, separated by 1920 the "," character (ASCII code 44): 1922 1. The request timestamp as described in Section 5.3.1.1. 1924 2. The request nonce as described in Section 5.3.1.1. 1926 3. The cryptographic algorithm used. 1928 4. The HTTP request method in uppercase. For example: "HEAD", 1929 "GET", "POST", etc. 1931 5. The hostname, colon-separated (ASCII code 58) from the TCP port 1932 used to make the request as included in the HTTP request "Host" 1933 header field. The port MUST be included even if it is not 1934 included in the "Host" header field (i.e. the default port for 1935 the scheme). 1937 6. The request resource URI. 1939 For example, the normalized request string for the "GET" request URI 1940 "http://example.com/resource", request timestamp "137131200", request 1941 nonce "s8djwd", and "hmac-sha256" algorithm (line breaks are for 1942 display purposes only): 1944 137131200,s8djwd,hmac-sha256,GET,example.com:80, 1945 http://example.com/resource 1947 5.3.1.3. Signature Calculation 1949 Clients calculate the request signature using the HMAC-SHA256 1950 function: 1952 digest = HMAC-SHA256 (key, text) 1954 by setting the function variables are follows: 1956 text 1957 is set to the value of the normalize request string as 1958 described in Section 5.3.1.2. 1960 key 1961 is set to the access token secret. 1963 The request signature is the calculated value of the "digest" 1964 variable after the result octet string is base64-encoded per 1965 [RFC2045] section 6.8. 1967 6. Identifying a Protected Resource 1969 Clients access protected resources after locating the appropriate 1970 authorization and token endpoints and obtaining an access token. In 1971 many cases, interacting with a protected resource requires prior 1972 knowledge of the protected resource properties and methods, as well 1973 as its authentication requirements (i.e. establishing client 1974 identity, locating the authorization and token endpoints). 1976 However, there are cases in which clients are unfamiliar with the 1977 protected resource, including whether the resource requires 1978 authentication. When clients attempt to access an unfamiliar 1979 protected resource without an access token, the resource server 1980 denies the request and informs the client of the required credentials 1981 using an HTTP authentication challenge. 1983 In addition, when receiving an invalid authenticated request, the 1984 resource server issues an authentication challenge including the 1985 error type and message. 1987 6.1. The WWW-Authenticate Response Header 1989 A resource server receiving a request for a protected resource 1990 without a valid access token MUST respond with a 401 HTTP status code 1991 (Unauthorized), and includes at least one "Token" "WWW-Authenticate" 1992 response header field challenge. 1994 The "WWW-Authenticate" header field uses the framework defined by 1995 [RFC2617] as follows: 1997 challenge = "Token" RWS token-challenge 1999 token-challenge = realm 2000 [ CS authz-uri ] 2001 [ CS token-uri ] 2002 [ CS algorithms ] 2003 [ CS error ] 2005 authz-uri = "auth-uri" "=" URI-Reference 2006 token-uri = "token-uri" "=" URI-Reference 2007 algorithms = "algorithms" "=" <"> 1#algorithm-name <"> 2008 error = "error" "=" <"> token <"> 2010 CS = OWS "," OWS 2012 6.1.1. The 'realm' Attribute 2014 The "realm" attribute is used to provide the protected resources 2015 partition as defined by [RFC2617]. 2017 6.1.2. The 'authorization-uri' Attribute 2019 6.1.3. The 'algorithms' Attribute 2021 6.1.4. The 'error' Attribute 2023 7. Security Considerations 2025 [[ Todo ]] 2027 8. IANA Considerations 2029 [[ Not Yet ]] 2031 9. Acknowledgements 2033 [[ Add OAuth 1.0a authors + WG contributors ]] 2035 Appendix A. Differences from OAuth 1.0a 2037 [[ Todo ]] 2039 Appendix B. Document History 2041 [[ to be removed by RFC editor before publication as an RFC ]] 2043 -01 2045 o Editorial changes based on feedback from Brian Eaton, Bill Keenan, 2046 and Chuck Mortimore. 2048 o Changed devide flow "type" parameter values and switch to use only 2049 the token endpoint. 2051 -00 2053 o Initial draft based on a combination of WRAP and OAuth 1.0a. 2055 10. References 2057 10.1. Normative References 2059 [I-D.ietf-httpbis-p1-messaging] 2060 Fielding, R., Gettys, J., Mogul, J., Nielsen, H., 2061 Masinter, L., Leach, P., Berners-Lee, T., and J. Reschke, 2062 "HTTP/1.1, part 1: URIs, Connections, and Message 2063 Parsing", draft-ietf-httpbis-p1-messaging-09 (work in 2064 progress), March 2010. 2066 [NIST FIPS-180-3] 2067 National Institute of Standards and Technology, "Secure 2068 Hash Standard (SHS). FIPS PUB 180-3, October 2008". 2070 [RFC2045] Freed, N. and N. Borenstein, "Multipurpose Internet Mail 2071 Extensions (MIME) Part One: Format of Internet Message 2072 Bodies", RFC 2045, November 1996. 2074 [RFC2104] Krawczyk, H., Bellare, M., and R. Canetti, "HMAC: Keyed- 2075 Hashing for Message Authentication", RFC 2104, 2076 February 1997. 2078 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 2079 Requirement Levels", BCP 14, RFC 2119, March 1997. 2081 [RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., 2082 Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext 2083 Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999. 2085 [RFC2617] Franks, J., Hallam-Baker, P., Hostetler, J., Lawrence, S., 2086 Leach, P., Luotonen, A., and L. Stewart, "HTTP 2087 Authentication: Basic and Digest Access Authentication", 2088 RFC 2617, June 1999. 2090 [RFC2818] Rescorla, E., "HTTP Over TLS", RFC 2818, May 2000. 2092 [RFC3447] Jonsson, J. and B. Kaliski, "Public-Key Cryptography 2093 Standards (PKCS) #1: RSA Cryptography Specifications 2094 Version 2.1", RFC 3447, February 2003. 2096 [RFC3629] Yergeau, F., "UTF-8, a transformation format of ISO 2097 10646", STD 63, RFC 3629, November 2003. 2099 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 2100 Resource Identifier (URI): Generic Syntax", STD 66, 2101 RFC 3986, January 2005. 2103 [W3C.REC-html40-19980424] 2104 Hors, A., Jacobs, I., and D. Raggett, "HTML 4.0 2105 Specification", World Wide Web Consortium 2106 Recommendation REC-html40-19980424, April 1998, 2107 . 2109 10.2. Informative References 2111 [I-D.hammer-oauth] 2112 Hammer-Lahav, E., "The OAuth 1.0 Protocol", 2113 draft-hammer-oauth-10 (work in progress), February 2010. 2115 [I-D.hardt-oauth] 2116 Hardt, D., Tom, A., Eaton, B., and Y. Goland, "OAuth Web 2117 Resource Authorization Profiles", draft-hardt-oauth-01 2118 (work in progress), January 2010. 2120 [OASIS.saml-core-2.0-os] 2121 Cantor, S., Kemp, J., Philpott, R., and E. Maler, 2122 "Assertions and Protocol for the OASIS Security Assertion 2123 Markup Language (SAML) V2.0", OASIS Standard saml-core- 2124 2.0-os, March 2005. 2126 Authors' Addresses 2128 Eran Hammer-Lahav (editor) 2129 Yahoo! 2131 Email: eran@hueniverse.com 2132 David Recordon 2133 Facebook 2135 Email: davidrecordon@facebook.com 2136 URI: http://www.davidrecordon.com/ 2138 Dick Hardt 2140 Email: dick.hardt@gmail.com 2141 URI: http://dickhardt.org/