idnits 2.17.1 draft-hammer-oauth2-00.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 22, 2010) is 5110 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 2052, but no explicit reference was found in the text == Unused Reference: 'RFC3447' is defined on line 2078, but no explicit reference was found in the text == Unused Reference: 'RFC3629' is defined on line 2082, but no explicit reference was found in the text == Unused Reference: 'I-D.hammer-oauth' is defined on line 2097, but no explicit reference was found in the text == Unused Reference: 'I-D.hardt-oauth' is defined on line 2101, but no explicit reference was found in the text == Outdated reference: A later version (-26) exists of draft-ietf-httpbis-p1-messaging-09 -- Possible downref: Non-RFC (?) normative reference: ref. 'NIST FIPS-180-3' ** Downref: Normative reference to an Informational RFC: RFC 2104 ** Obsolete normative reference: RFC 2616 (Obsoleted by RFC 7230, RFC 7231, RFC 7232, RFC 7233, RFC 7234, RFC 7235) ** Obsolete normative reference: RFC 2617 (Obsoleted by RFC 7235, RFC 7615, RFC 7616, RFC 7617) ** Obsolete normative reference: RFC 2818 (Obsoleted by RFC 9110) ** Obsolete normative reference: RFC 3447 (Obsoleted by RFC 8017) Summary: 5 errors (**), 0 flaws (~~), 8 warnings (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group E. Hammer-Lahav, Ed. 3 Internet-Draft Yahoo! 4 Intended status: Standards Track D. Recordon 5 Expires: October 24, 2010 Facebook 6 D. Hardt 7 April 22, 2010 9 The OAuth 2.0 Protocol 10 draft-hammer-oauth2-00 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 24, 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 . . . . . . . . . . . . . . . . . . . 15 71 3.5.3. Device Flow . . . . . . . . . . . . . . . . . . . . . 21 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 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 The use of OAuth with any other transport protocol than HTTP 144 [RFC2616] (or HTTP over TLS 1.0 as defined by [RFC2818] is undefined. 146 2.1. Terminology 148 resource server 149 An HTTP [RFC2616] server capable of accepting authenticated 150 resource requests using the OAuth protocol. 152 protected resource 153 An access-restricted resource which can be obtained from a 154 resource server using an OAuth-authenticated request. 156 client 157 An HTTP client capable of making authenticated requests for 158 protected resources using the OAuth protocol. 160 resource owner 161 An entity capable of granting access to a protected resource. 163 end user 164 A human resource owner. 166 access token 167 A unique identifier used by the client to make authenticated 168 requests on behalf of the resource owner. Access tokens may 169 have a matching secret. 171 authorization server 172 An HTTP server capable of issuing tokens after successfully 173 authenticating the resource owner and obtaining authorization. 174 The authorization server may be the same server as the resource 175 server, or a separate entity. 177 authorization endpoint 178 The authorization server's HTTP endpoint capable of 179 authenticating the resource owner and obtaining authorization. 181 token endpoint 182 The authorization server's HTTP endpoint capable of issuing 183 tokens and refreshing expired tokens. 185 client identifier 186 An unique identifier issued to the client to identify itself to 187 the authorization server. Client identifiers may have a 188 matching secret. 190 refresh token 191 A unique identifier used by the client to replace an expired 192 access token with a new access token without having to involve 193 the resource owner. A refresh token is used when the access 194 token is valid for a shorter time period than the duration of 195 the access grant approved by the resource owner. 197 2.2. Overview 199 Clients interact with a protected resource, first by requesting 200 access (which is granted in the form of an access token) from the 201 authorization server, and then by authenticating with the resource 202 server by presenting the access token. Figure 1 demonstrates the 203 flow between the client and authorization server (A, B), and the flow 204 between the client and resource server (C, D), when the client is 205 acting autonomously (the client is also the resource owner). 207 +--------+ +---------------+ 208 | |--(A)------ Credentials --------->| Authorization | 209 | | | Server | 210 | |<-(B)------ Access Token ---------| | 211 | | (w/ Optional Refresh Token) +---------------+ 212 | Client | 213 | | HTTP Request +---------------+ 214 | |--(C)--- with Access Token ------>| Resource | 215 | | | Server | 216 | |<-(D)------ HTTP Response --------| | 217 +--------+ +---------------+ 219 Figure 1 221 Access token strings can use any internal structure agreed upon 222 between the authorization server and the resource server, but their 223 structure is opaque to the client. Since the access token provides 224 the client access to the protected resource for the life of the 225 access token (or until revoked), the authorization server should 226 issue access tokens which expire within an appropriate time, usually 227 much shorter than the duration of the access grant. 229 When an access token expires, the client can request a new access 230 token from the authorization server by presenting its credentials 231 again (Figure 1), or by using the refresh token (if issued with the 232 access token) as shown in Figure 2. Once an expired access token has 233 been replaced with a new access token (A, B), the client uses the new 234 access token as before (C, D). 236 +--------+ +---------------+ 237 | |--(A)------ Refresh Token ------->| Authorization | 238 | | | Server | 239 | |<-(B)------ Access Token ---------| | 240 | | (with Optional Secret) +---------------+ 241 | Client | 242 | | HTTP Request +---------------+ 243 | |--(C)--- with Access Token ------>| Resource | 244 | | | Server | 245 | |<-(D)----- HTTP Response ---------| | 246 +--------+ +---------------+ 248 Figure 2 250 This specification defines a number of authorization flows to support 251 different client types and scenarios. These authorization flows can 252 be separated into three groups: user delegation flows where the 253 client is acting on behalf of an end user, end user credentials flows 254 where the client uses the end user's credentials directly to obtain 255 authorization, and autonomous flows where the client is acting for 256 itself (the client is also the resource owner). 258 Additional authorization flows may be defined by other specifications 259 to cover different scenarios and client types. 261 The user delegation authorization flows defined by this 262 specifications are: 264 o User-Agent Flow - This flow is designed for clients running inside 265 a user-agent (typically a web browser), and therefore cannot 266 receive incoming requests from the authorization server. This 267 flow is described in Section 3.5.1. 269 o Web Server Flow - This flow is optimized for cases where the 270 client is capable of receiving incoming HTTP requests (act as an 271 HTTP server). This flow is described in Section 3.5.2. 273 o Device Flow - This flow suitable for clients executing on limited 274 devices, but where the end user has separate access to a user- 275 agent on another computer or device. This flow is described in 276 Section 3.5.3. 278 The end user credentials flow defined by this specification is: 280 o Username and Password Flow - This flow is used in cases where the 281 end user trusts the client to handle its credentials but it is 282 still undesirable for the client to store the end user's username 283 and password. This flow is described in Section 3.6.1. 285 The autonomous authorization flows defined by this specifications 286 are: 288 o Client Credentials Flow - The client uses its credentials to 289 obtain an access token. This flow is described in Section 3.7.1. 291 o Assertion Flow - The client presents an assertion such as a SAML 292 [OASIS.saml-core-2.0-os] assertion to the authorization server in 293 exchange for an access token. This flow is described in 294 Section 3.7.2. 296 2.3. Example 298 [[ Todo ]] 300 2.4. Notational Conventions 302 The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL NOT', 303 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'MAY', and 'OPTIONAL' in this 304 document are to be interpreted as described in [RFC2119]. 306 This document uses the Augmented Backus-Naur Form (ABNF) notation of 307 [I-D.ietf-httpbis-p1-messaging]. Additionally, the realm and auth- 308 param rules are included from [RFC2617], and the URI-Reference rule 309 from [RFC3986]. 311 2.5. Conformance 313 An implementation is not compliant if it fails to satisfy one or more 314 of the MUST or REQUIRED level requirements for the flows it 315 implements. An implementation that satisfies all the MUST or 316 REQUIRED level and all the SHOULD level requirements for its flows is 317 said to be "unconditionally compliant"; one that satisfies all the 318 MUST level requirements but not all the SHOULD level requirements for 319 its flows is said to be "conditionally compliant." 321 3. 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 When issuing an access token, the scope, duration, and other access 329 attributes granted by the resource owner must be retained and 330 enforced by the resource server when receiving a protected resource 331 request and by the authorization server when receiving a token 332 refresh request made with the access token issued. 334 In many cases it is desirable to issue access tokens with a shorter 335 lifetime than the duration of the authorization grant. However, it 336 may be undesirable to require the resource owner to authorize the 337 request again. Instead, the authorization server issues a refresh 338 token in addition to the access token. When the access token 339 expires, the client can request a new access token without involving 340 the resource owner as long as the authorization grant is still valid. 341 The token refresh method is described in Section 4. 343 3.1. Authorization Endpoint 345 Clients direct the resource owner to the authorization endpoint to 346 approve their access request. Before granting access, the resource 347 owner first authenticate with the authorization server. The way in 348 which the authorization server authenticates the end user (e.g. 349 username and password login, OpenID, session cookies) and in which 350 the authorization server obtains the end user's authorization, 351 including whether it uses a secure channel such as TLS/SSL, is beyond 352 the scope of this specification. However, the authorization server 353 MUST first verify the identity of the end user. 355 The URI of the authorization endpoint can be found in the service 356 documentation, or can be obtained by the client by making an 357 unauthorized protected resource request (from the "WWW-Authenticate" 358 response header auth-uri (Section 6.1.2) attribute). 360 The authorization endpoint advertised by the resource server MAY 361 include a query components as defined by [RFC3986] section 3. 363 Since requests to the authorization endpoint result in user 364 authentication and the transmission of sensitive values, the 365 authorization server SHOULD require the use of a transport-layer 366 mechanism such as TLS or SSL (or a secure channel with equivalent 367 protections) when sending requests to the authorization endpoints. 369 3.2. Token Endpoint 371 After obtaining authorization from the resource owner, clients 372 request an access token from the authorization server's token 373 endpoint. 375 The URI of the token endpoint can be found in the service 376 documentation, or can be obtained by the client by making an 377 unauthorized protected resource request (from the "WWW-Authenticate" 378 response header token-uri (Section 6.1.2) attribute). 380 The token endpoint advertised by the resource server MAY include a 381 query components as defined by [RFC3986] section 3. 383 Since requests to the token endpoint result in the transmission of 384 plain text credentials in the HTTP request and response, the 385 authorization server MUST require the use of a transport-layer 386 mechanism such as TLS or SSL (or a secure channel with equivalent 387 protections) when sending requests to the token endpoints. 389 The authorization server MUST include the HTTP "Cache-Control" 390 response header field with a value of "no-store" in any response 391 containing tokens, secrets, or other sensitive information. 393 3.3. Flow Parameters 395 Clients should avoid making assumptions about the size of tokens and 396 other values received from the authorization server, which are left 397 undefined by this specification. Servers should document the 398 expected size of any value they issue. 400 3.4. Client Credentials 402 When requesting access from the authorization server, the client 403 identifies itself using its authorization-server-issued client 404 credentials. The client credentials include a client identifier and 405 an OPTIONAL symmetric shared secret. The means through which the 406 client obtains these credentials are beyond the scope of this 407 specification, but usually involve registration with the 408 authorization server. 410 The client identifier is used by the authorization server to 411 establish the identity of the client for the purpose of presenting 412 information to the resource owner prior to granting access, as well 413 as for providing different service levels to different clients. They 414 can also be used to block unauthorized clients from requesting 415 access. 417 Due to the nature of some clients, authorization servers SHOULD NOT 418 make assumptions about the confidentiality of client credentials 419 without establishing trust with the client operator. Authorization 420 servers SHOULD NOT issue client secrets to the client incapable or 421 keeping their secrets confidential. 423 3.5. User Delegation Flows 425 User delegation flows are used to grant client access to protected 426 resources by the end user without sharing the end user credentials 427 (e.g. a username and password) with the client. Instead, the end 428 user authenticates directly with the authorization server, and grants 429 client access to its protected resources. 431 3.5.1. User-Agent Flow 433 The user-agent flow is a user delegation flow suitable for client 434 applications residing in a user-agent, typically implemented in a 435 browser using a scripting language such as JavaScript. The client is 436 capable of interacting with the end user's user-agent but is 437 incapable of receiving incoming requests from the authorization 438 server (incapable of acting as an HTTP server). 440 Instead of receiving incoming requests, the client requests the 441 authorization server to redirect the user-agent to another web server 442 or local resource accessible to the browser which is capable of 443 extracting the access token from the response and passing it to the 444 client. 446 This user-agent flow does not utilize the client secret since the 447 client executables reside on the end user's computer or device which 448 makes the client secret accessible and exploitable. Because the 449 client is incapable of receiving incoming requests, the access token 450 is encoded into the redirection URI which exposes it to the end user 451 and other applications residing on the computer or device. 453 +----------+ Client Identifier +----------------+ 454 | |>---(A)-- & Redirection URI --->| | 455 | | | | 456 End <--+ - - - +----(B)-- User authenticates -->| Authorization | 457 User | | | Server | 458 | |<---(C)-- Redirect URI --------<| | 459 | Client | with Access Token | | 460 | in | (w/ Optional Refresh Token) +----------------+ 461 | Browser | in Fragment 462 | | +----------------+ 463 | |>---(D)-- Redirect URI -------->| | 464 | | without Fragment | Web Server | 465 | | | with Client | 466 | (F) |<---(E)-- Web Page with -------<| Resource | 467 | Access | Script | | 468 | Token | +----------------+ 469 +----------+ 470 Figure 3 472 The user-agent flow illustrated in Figure 3 includes the following 473 steps: 475 (A) The client sends the user-agent to the authorization server and 476 includes its client identifier and redirection URI in the 477 request. 479 (B) The authorization server authenticates the end user (via the 480 user-agent) and establishes whether the end user grants or 481 denies the client's access request. 483 (C) Assuming the end user granted access, the authorization server 484 redirects the user-agent to the redirection URI provided 485 earlier. The redirection URI includes the access token in the 486 URI fragment. 488 (D) The user-agent follows the redirection instructions by making a 489 request to the web server which does not include the fragment. 490 The user-agent retains the fragment information locally. 492 (E) The web server returns a web page containing a script capable of 493 extracting the access token from the URI fragment retained by 494 the user-agent. 496 (F) The user-agent executes the script provided by the web server 497 which extracts the access token and passes it to the client. 499 3.5.1.1. Client Requests Authorization 501 In order for the end user to grant the client access, the client 502 sends the end user to the authorization server. The client 503 constructs the request URI by adding the following URI query 504 parameters to the user authorization endpoint URI: 506 type 507 REQUIRED. The parameter value MUST be set to "user_agent" 508 (case sensitive). 510 client_id 511 REQUIRED. The client identifier as described in Section 3.4. 513 redirect_uri 514 REQUIRED unless a redirection URI has been established between 515 the client and authorization server via other means. An 516 absolute URI to which the authorization server will redirect 517 the user-agent to when the end user authorization step is 518 completed. The authorization server SOULD require the client 519 to pre-register their redirection URI. The redirection URI 520 MUST NOT includes a query component as defined by [RFC3986] 521 section 3 if the "state" parameter is present. 523 state 524 OPTIONAL. An opaque value used by the client to maintain state 525 between the request and callback. The authorization server 526 includes this value when redirecting the user-agent back to the 527 client. 529 immediate 530 OPTIONAL. The parameter value must be set to "true" or "false" 531 (case sensitive). If set to "true", the authorization server 532 MUST NOT prompt the end user to authenticate or approve access. 533 Instead, the authorization server attempts to establish the end 534 user's identity via other means (e.g. browser cookies) and 535 checks if the end user has previously approved an identical 536 access request by the same client and if that access grant is 537 still active. If the authorization server does not support an 538 immediate check or if it is unable to establish the end user's 539 identity or approval status, it MUST deny the request without 540 prompting the end user. Defaults to "false" if omitted. 542 secret_type 543 OPTIONAL. The access token secret type as described by 544 Section 5.3. If omitted, the authorization server will issue a 545 bearer token (an access token without a matching secret) as 546 described by Section 5.2. 548 The client directs the end user to the constructed URI using an HTTP 549 redirection response, or by other means available to it via the end 550 user's user-agent. The request MUST use the HTTP "GET" method. 552 For example, the client directs the end user's user-agent to make the 553 following HTTPS request (line breaks are for display purposes only): 555 GET /authorize?type=user_agent&client_id=s6BhdRkqt3& 556 redirect_uri=https%3A%2F%2FEexample%2Ecom%2Frd HTTP/1.1 557 Host: server.example.com 559 If the client has previously registered a redirection URI with the 560 authorization server, the authorization server MUST verify that the 561 redirection URI received matches the registered URI associated with 562 the client identifier. 564 The authorization server authenticates the end user and obtains an 565 authorization decision (by asking the end user or establishing 566 approval via other means). The authorization server sends the end 567 user's user-agent to the provided client redirection URI using an 568 HTTP redirection response. 570 3.5.1.1.1. End User Grants Authorization 572 If the end user authorizes the access request, the authorization 573 server issues an access token and delivers it to the client by adding 574 the following parameters, using the 575 "application/x-www-form-urlencoded" format as defined by 576 [W3C.REC-html40-19980424], to the redirection URI fragment: 578 access_token 579 REQUIRED. The access token. 581 expires_in 582 OPTIONAL. The duration in seconds of the access token 583 lifetime. 585 refresh_token 586 OPTIONAL. The refresh token. 588 state 589 REQUIRED if the "state" parameter was present in the client 590 authorization request. Set to the exact value received from 591 the client. 593 access_token_secret 594 REQUIRED if requested by the client. The corresponding access 595 token secret as requested by the client. 597 For example, the authorization server redirects the end user's user- 598 agent by sending the following HTTP response: 600 HTTP/1.1 302 Found 601 Location: http://example.com/rd#access_token=FJQbwq9&expires_in=3600 603 3.5.1.1.2. End User Denies Authorization 605 If the end user denied the access request, the authorization server 606 responds to the client by adding the following parameters, using the 607 "application/x-www-form-urlencoded" format as defined by 608 [W3C.REC-html40-19980424], to the redirection URI fragment: 610 error 611 REQUIRED. The parameter value MUST be set to "user_denied" 612 (case sensitive). 614 state 615 REQUIRED if the "state" parameter was present in the client 616 authorization request. Set to the exact value received from 617 the client. 619 For example, the authorization server responds with the following: 621 HTTP/1.1 302 Found 622 Location: http://example.com/rd#error=user_denied 624 The authorization flow concludes unsuccessfully. To extract the 625 error message, the client follows the steps described in 626 Section 3.5.1.2. 628 3.5.1.2. Client Extracts Access Token 630 The user-agent follows the authorization server redirection response 631 by making an HTTP "GET" request to the URI received in the "Location" 632 HTTP response header. The user-agent SHALL NOT include the fragment 633 component with the request. 635 For example, the user-agent makes the following HTTP "GET" request in 636 response to the redirection directive received from the authorization 637 server: 639 GET /rd HTTP/1.1 640 Host: example.com 642 The HTTP response to the redirection request returns a web page 643 (typically an HTML page with an embedded script) capable of accessing 644 the full redirection URI including the fragment retained by the user- 645 agent, and extracting the access token (and other parameters) 646 contained in the fragment. 648 3.5.2. Web Server Flow 650 The web server flow is a user delegation flow suitable for clients 651 capable of interacting with the end user's user-agent (typically a 652 web browser) and capable of receiving incoming requests from the 653 authorization server (capable of acting as an HTTP server). 655 +----------+ Client Identifier +---------------+ 656 | -+----(A)-- & Redirect URI ------->| | 657 | End User | | Authorization | 658 | at |<---(B)-- User authenticates --->| Server | 659 | Browser | | | 660 | -+----(C)-- Verification Code ----<| | 661 +-|----|---+ +---------------+ 662 | | ^ v 663 (A) (C) | | 664 | | | | 665 ^ v | | 666 +---------+ | | 667 | |>---(D)-- Client Credentials, --------' | 668 | Web | Verification Code, | 669 | Client | & Redirect URI | 670 | | | 671 | |<---(E)------- Access Token -----------------' 672 +---------+ (w/ Optional Refresh Token) 674 Figure 4 676 The web server flow illustrated in Figure 4 includes the following 677 steps: 679 (A) The web client initiates the flow by redirecting the end user's 680 user-agent to the authorization endpoint with its client 681 identifier and a redirect URI to which the authorization server 682 will send the end user back once authorization is received (or 683 denied). 685 (B) The authorization server authenticates the end user (via the 686 user-agent) and establishes whether the end user grants or 687 denies the client's access request. 689 (C) Assuming the end user granted access, the authorization server 690 redirects the user-agent back to the client to the redirection 691 URI provided earlier. The authorization includes a verification 692 code for the client to use to obtain an access token. 694 (D) The client requests an access token from the authorization 695 server by including its client credentials (identifier and 696 secret), as well as the verification code received in the 697 previous step. 699 (E) The authorization server validates the client credentials and 700 the verification code and responds back with the access token. 702 3.5.2.1. Client Requests Authorization 704 In order for the end user to grant the client access, the client 705 sends the end user to the authorization server. The client 706 constructs the request URI by adding the following URI query 707 parameters to the user authorization endpoint URI: 709 type 710 REQUIRED. The parameter value MUST be set to "web_server" 711 (case sensitive). 713 client_id 714 REQUIRED. The client identifier as described in Section 3.4. 716 redirect_uri 717 REQUIRED unless a redirection URI has been established between 718 the client and authorization server via other means. An 719 absolute URI to which the authorization server will redirect 720 the user-agent to when the end user authorization step is 721 completed. The authorization server MAY require the client to 722 pre-register their redirection URI. The redirection URI MUST 723 NOT includes a query component as defined by [RFC3986] section 724 3 if the "state" parameter is present. 726 state 727 OPTIONAL. An opaque value used by the client to maintain state 728 between the request and callback. The authorization server 729 includes this value when redirecting the user-agent back to the 730 client. 732 immediate 733 OPTIONAL. The parameter value must be set to "true" or "false" 734 (case sensitive). If set to "true", the authorization server 735 MUST NOT prompt the end user to authenticate or approve access. 736 Instead, the authorization server attempts to establish the end 737 user's identity via other means (e.g. browser cookies) and 738 checks if the end user has previously approved an identical 739 access request by the same client and if that access grant is 740 still active. If the authorization server does not support an 741 immediate check or if it is unable to establish the end user's 742 identity or approval status, it MUST deny the request without 743 prompting the end user. Defaults to "false" if omitted. 745 The client directs the end user to the constructed URI using an HTTP 746 redirection response, or by other means available to it via the end 747 user's user-agent. The request MUST use the HTTP "GET" method. 749 For example, the client directs the end user's user-agent to make the 750 following HTTPS requests (line breaks are for display purposes only): 752 GET /authorize?type=web_server&client_id=s6BhdRkqt3&redirect_uri= 753 https%3A%2F%2Fclient%2Eexample%2Ecom%2Fcb HTTP/1.1 754 Host: server.example.com 756 If the client has previously registered a redirection URI with the 757 authorization server, the authorization server MUST verify that the 758 redirection URI received matches the registered URI associated with 759 the client identifier. 761 The authorization server authenticates the end user and obtains an 762 authorization decision (by asking the end user or establishing 763 approval via other means). The authorization server sends the end 764 user's user-agent to the provided client redirection URI using an 765 HTTP redirection response, or by other means available to it via the 766 end user's user-agent. 768 3.5.2.1.1. End User Grants Authorization 770 If the end user authorizes the access request, the authorization 771 server generates a verification code and associates it with the 772 client identifier and redirection URI. The authorization server 773 constructs the request URI by adding the following parameters to the 774 query component of redirection URI provided by the client: 776 code 777 REQUIRED. The verification code generated by the authorization 778 server. 780 state 781 REQUIRED if the "state" parameter was present in the client 782 authorization request. Set to the exact value received from 783 the client. 785 The verification code SHOULD expire shortly after it is issued and 786 allowed for a single use. 788 For example, the authorization server redirects the end user's user- 789 agent by sending the following HTTP response: 791 HTTP/1.1 302 Found 792 Location: https://client.example.com/cb?code=i1WsRn1uB1 794 In turn, the end user's user-agent makes the following HTTPS "GET" 795 request: 797 GET /cb?code=i1WsRn1uB1 HTTP/1.1 798 Host: client.example.com 800 3.5.2.1.2. End User Denies Authorization 802 If the end user denied the access request, the authorization server 803 constructs the request URI by adding the following parameters to the 804 query component of the redirection URI provided by the client: 806 error 807 REQUIRED. The parameter value MUST be set to "user_denied" 808 (case sensitive). 810 state 811 REQUIRED if the "state" parameter was present in the client 812 authorization request. Set to the exact value received from 813 the client. 815 For example, the authorization server directs the client to make the 816 following HTTP request: 818 GET /cb?error=user_denied HTTP/1.1 819 Host: client.example.com 821 The authorization flow concludes unsuccessfully. 823 3.5.2.2. Client Requests Access Token 825 The client obtains an access token from the authorization server by 826 making an HTTP "POST" request to the token endpoint. The client 827 constructs a request URI by adding the following parameters to the 828 request: 830 type 831 REQUIRED. The parameter value MUST be set to "web_server" 832 (case sensitive). 834 client_id 835 REQUIRED. The client identifier as described in Section 3.4. 837 client_secret 838 REQUIRED if the client identifier has a matching secret. The 839 client secret as described in Section 3.4. 841 code 842 REQUIRED. The verification code received from the 843 authorization server. 845 redirect_uri 846 REQUIRED. The redirection URI used in the initial request. 848 secret_type 849 OPTIONAL. The access token secret type as described by 850 Section 5.3. If omitted, the authorization server will issue a 851 bearer token (an access token without a matching secret) as 852 described by Section 5.2. 854 For example, the client makes the following HTTPS request (line 855 breaks are for display purposes only): 857 POST /token HTTP/1.1 858 Host: server.example.com 859 Content-Type: application/x-www-form-urlencoded 861 type=web_server&client_id=s6BhdRkqt3& 862 client_secret=gX1fBat3bV&code=i1WsRn1uB1& 863 redirect_uri=https%3A%2F%2Fclient%2Eexample%2Ecom%2Fcb 865 The authorization server MUST verify that the verification code, 866 client identity, client secret, and redirection URI are all valid and 867 match its stored association. If the request is valid, the 868 authorization server issues an access token and delivers it to the 869 client in the HTTP response body using the 870 "application/x-www-form-urlencoded" content type as defined by 871 [W3C.REC-html40-19980424] with a 200 status code (OK). 873 The response contains the following parameters: 875 access_token 876 REQUIRED. The access token issued by the authorization server. 878 expires_in 879 OPTIONAL. The duration in seconds of the access token 880 lifetime. 882 refresh_token 883 OPTIONAL. The refresh token used to obtain new access tokens 884 using the same end user access grant as described in Section 4. 886 access_token_secret 887 REQUIRED if requested by the client. The corresponding access 888 token secret as requested by the client. 890 For example: 892 HTTP/1.1 200 OK 893 Content-Type: application/x-www-form-urlencoded 895 access_token=SlAV32hkKG&expires_in=3600&refresh_token=8xLOxBtZp8 897 If the request is invalid, the authorization server returns an error 898 message in the HTTP response body using the 899 "application/x-www-form-urlencoded" content type as defined by 900 [W3C.REC-html40-19980424] with a 400 status code (Bad Request). 902 The response contains the following parameter: 904 error 905 OPTIONAL. The parameter value MUST be set to either 906 "redirect_uri_mismatch" or "expired_verification_code" (case 907 sensitive). 909 For example: 911 HTTP/1.1 400 Bad Request 912 Content-Type: application/x-www-form-urlencoded 914 error=expired_verification_code 916 3.5.3. Device Flow 918 The device flow is a user delegation flow suitable for clients 919 executing on devices which do not have an easy data-entry method 920 (e.g. game consoles or media hub), but where the end user has 921 separate access to a user-agent on another computer or device (e.g. 922 home computer, a laptop, or a smartphone). The client is incapable 923 of receiving incoming requests from the authorization server 924 (incapable of acting as an HTTP server). 926 Instead of interacting with the end user's user-agent, the client 927 instructs the end user to use another computer or device and connect 928 to the authorization server to approve the access request. Since the 929 client cannot receive incoming requests, it polls the authorization 930 server repeatedly until the end user completes the approval process. 932 This device flow does not utilize the client secret since the client 933 executables reside on a local device which makes the client secret 934 accessible and exploitable. 936 +----------+ +----------------+ 937 | |>---(A)-- Client Identifier --->| | 938 | | | | 939 | |<---(B)-- Verification Code, --<| | 940 | | User Code, | | 941 | | & Verification URI | | 942 | Device | | | 943 | Client | Client Identifier & | | 944 | |>---(E)-- Verification Code --->| | 945 | | ... | | 946 | |>---(E)---> | | 947 | | | Authorization | 948 | |<---(F)-- Access Token --------<| Server | 949 +----------+ (w/ Optional Refresh Token) | | 950 v | | 951 : | | 952 (C) User Code & Verification URI | | 953 : | | 954 v | | 955 +----------+ | | 956 | End User | | | 957 | at |<---(D)-- User authenticates -->| | 958 | Browser | | | 959 +----------+ +----------------+ 961 Figure 5 963 The device flow illustrated in Figure 5 includes the following steps: 965 (A) The client requests access from the authorization server and 966 includes its client identifier in the request. 968 (B) The authorization server issues a verification code, a user 969 code, and provides the end user authorization URI. 971 (C) The client instructs the end user to use its user-agent 972 (elsewhere) and visit the provided authorization URI. The 973 client provides the user with the user code to enter in order to 974 grant access. 976 (D) The authorization server authenticates the end user (via the 977 user-agent) and prompts the end user to grant the client's 978 access request by entering the user code provided by the client. 980 (E) While the end user authorizes (or denies) the client's request 981 (D), the client repeatedly polls the authorization server to 982 find out if the end user completed the user authorization step. 983 The client includes the verification code and its client 984 identifier. 986 (F) Assuming the end user granted access, the authorization server 987 validates the verification code provided by the client and 988 responds back with the access token. 990 3.5.3.1. Client Requests Authorization 992 The client initiates the flow by requesting a set of verification 993 codes from the authorization server by making an HTTP "GET" request 994 to the authorization endpoint. The client constructs a request URI 995 by adding the following parameters to the request: 997 type 998 REQUIRED. The parameter value MUST be set to 'device' (case 999 sensitive). 1001 client_id 1002 REQUIRED. The client identifier as described in Section 3.4. 1004 For example, the client makes the following HTTPS request (line 1005 breaks are for display purposes only): 1007 GET /authorize?type=device&client_id=s6BhdRkqt3 1008 HTTP/1.1 1009 Host: server.example.com 1011 In response, the authorization server generates a verification code 1012 and a user code and includes them in the HTTP response body using the 1013 "application/x-www-form-urlencoded" format as defined by 1014 [W3C.REC-html40-19980424] with a 200 status code (OK). The response 1015 contains the following parameters: 1017 code 1018 REQUIRED. The verification code. 1020 user_code 1021 REQUIRED. The user code. 1023 user_uri 1024 REQUIRED. The user authorization URI on the authorization 1025 server. 1027 expires_in 1028 OPTIONAL. The duration in seconds of the verification code 1029 lifetime. 1031 interval 1032 OPTIONAL. The minimum amount of time in seconds that the 1033 client SHOULD wait between polling requests to the token 1034 endpoint. 1036 For example (line breaks are for display purposes only): 1038 HTTP/1.1 200 OK 1039 Content-Type: application/x-www-form-urlencoded 1041 device_code=74tq5miHKB&user_code=94248&user_uri=http%3A%2F%2 1042 Fwww%2Eexample%2Ecom%2Fdevice&interval=5 1044 The client displays the user code and the user authorization URI to 1045 the end-user, and instructs the end user to visit the URI using a 1046 user-agent and enter the user code. 1048 The end user manually types the provided URI and authenticates with 1049 the authorization server. The authorization server prompts the end 1050 user to authorize the client's request by entering the user code 1051 provided by the client. Once the end user approves or denies the 1052 request, the authorization server informs the end user to return to 1053 the device for further instructions. 1055 3.5.3.2. Client Requests Access Token 1057 Since the client is unable to receive incoming requests from the 1058 authorization server, it polls the authorization server repeatedly 1059 until the end user grants or denies the request, or the verification 1060 code expires. 1062 The client makes the following request at an arbitrary but reasonable 1063 interval which MUST NOT exceed the minimum interval rate provided by 1064 the authorization server (if present via the "interval" parameter). 1065 Alternatively, the client MAY provide a user interface for the end 1066 user to manually inform it when authorization was granted. 1068 The client requests an access token by making an HTTP "GET" request 1069 to the token endpoint. The client constructs a request URI by adding 1070 the following parameters to the request: 1072 type 1073 REQUIRED. The parameter value MUST be set to 'device' (case 1074 sensitive). 1076 client_id 1077 REQUIRED. The client identifier as described in Section 3.4. 1079 code 1080 The verification code received from the authorization server. 1082 secret_type 1083 OPTIONAL. The access token secret type as described by 1084 Section 5.3. If omitted, the authorization server will issue a 1085 bearer token (an access token without a matching secret) as 1086 described by Section 5.2. 1088 For example, the client makes the following HTTPS request (line 1089 breaks are for display purposes only): 1091 GET /token?type=device&client_id=s6BhdRkqt3 1092 &code=J2vC42OifV HTTP/1.1 1093 Host: server.example.com 1095 3.5.3.2.1. End User Grants Authorization 1097 If the end user authorized the request, the authorization server 1098 issues an access token and delivers it to the client by including it 1099 in the HTTP response body using the 1100 "application/x-www-form-urlencoded" content type as defined by 1101 [W3C.REC-html40-19980424] with a 200 status code (OK). The response 1102 contains the following parameters: 1104 access_token 1105 REQUIRED. The access token. 1107 expires_in 1108 OPTIONAL. The duration in seconds of the access token 1109 lifetime. 1111 refresh_token 1112 OPTIONAL. The refresh token. 1114 access_token_secret 1115 REQUIRED if requested by the client. The corresponding access 1116 token secret as requested by the client. 1118 For example: 1120 HTTP/1.1 200 OK 1121 Content-Type: application/x-www-form-urlencoded 1123 access_token=FJQbwq9OD8&expires_in=3600 1125 3.5.3.2.2. End User Denies Authorization 1127 If the end user denied the request, the authorization server provides 1128 the client with the error message in the HTTP response body using the 1129 "application/x-www-form-urlencoded" content type as defined by 1130 [W3C.REC-html40-19980424] with a 400 status code (Bad Request). The 1131 response contains the following parameters: 1133 error 1134 REQUIRED. Value must be set to "authorization_declined". 1136 For example: 1138 HTTP/1.1 400 Bad Request 1139 Content-Type: application/x-www-form-urlencoded 1141 error=authorization_declined 1143 3.5.3.2.3. End User Authorization Pending or Expired 1145 If the end user authorization is pending or expired without receiving 1146 any response from the end user, or the client is exceeding the 1147 allowed polling interval, the authorization server provides the 1148 client with the error message in the HTTP response body using the 1149 "application/x-www-form-urlencoded" content type as defined by 1150 [W3C.REC-html40-19980424] with a 400 status code (Bad Request). The 1151 response contains the following parameters: 1153 error 1154 REQUIRED. Value MUST be set to "authorization_pending", 1155 "slow_down", or "code_expired" (case sensitive). 1157 For example: 1159 HTTP/1.1 400 Bad Request 1160 Content-Type: application/x-www-form-urlencoded 1162 error=authorization_pending 1164 3.6. End User Credentials Flows 1166 End user credential flows are used to grant client access to 1167 protected resources by the end user directly sharing the end user 1168 credentials (typically a username and password) with the client. 1169 Unlike user delegation flows, end user credentials flows require a 1170 much higher degree of trust between the client and end user. 1172 These flows are suitable in cases where the end user already has a 1173 trust relationship with the client, such as its computer operating 1174 system or highly privileged applications. Authorization servers 1175 SHOULD take special care when enabling user credentials flows, and 1176 SHOULD only do so when other delegation flows are not viable. 1178 However, unlike the HTTP Basic authentication scheme defined in 1179 [RFC2617], the end user's credentials are used in a single request 1180 and are exchanged for an access token and refresh token which 1181 eliminates the client need to store them for future use. 1183 3.6.1. Username and Password Flow 1185 The username and password flow is an end user credentials flow 1186 suitable for clients capable of asking end users for their usernames 1187 and passwords. It is also used to migrate existing clients using 1188 direct authentication schemes such as HTTP Basic or Digest 1189 authentication to OAuth by converting the end user credentials stored 1190 with tokens. 1192 The methods through which the client prompts end users for their 1193 usernames and passwords is beyond the scope of this specification. 1194 The client MUST discard the usernames and passwords once an access 1195 token has been obtained. 1197 End User 1198 v 1199 : 1200 (A) 1201 : 1202 v 1203 +--------+ +---------------+ 1204 | | Client Credentials | | 1205 | |>--(B)--- & User Credentials ---->| Authorization | 1206 | Client | | Server | 1207 | |<--(C)---- Access Token ---------<| | 1208 | | (w/ Optional Refresh Token) | | 1209 +--------+ +---------------+ 1211 Figure 6 1213 The username and password flow illustrated in Figure 6 includes the 1214 following steps: 1216 (A) The end user provides the client with its username and password. 1218 (B) The client sends an access token request to the authorization 1219 server and includes its client identifier and client secret, and 1220 the end user's username and password. 1222 (C) The authorization server validates the end user credentials and 1223 the client credentials and issues an access token. 1225 3.6.1.1. Client Requests Access Token 1227 The client requests an access token by making an HTTP "POST" request 1228 to the token endpoint. The client constructs a request URI by adding 1229 the following parameters to the request: 1231 type 1232 REQUIRED. The parameter value MUST be set to 'username' (case 1233 sensitive). 1235 client_id 1236 REQUIRED. The client identifier as described in Section 3.4. 1238 client_secret 1239 REQUIRED. The client secret as described in Section 3.4. 1240 OPTIONAL if no client secret was issued. 1242 username 1243 REQUIRED. The end user's username. 1245 password 1246 REQUIRED. The end user's password. 1248 secret_type 1249 OPTIONAL. The access token secret type as described by 1250 Section 5.3. If omitted, the authorization server will issue a 1251 bearer token (an access token without a matching secret) as 1252 described by Section 5.2. 1254 For example, the client makes the following HTTPS request (line 1255 breaks are for display purposes only): 1257 POST /token HTTP/1.1 1258 Host: server.example.com 1260 type=username&client_id=s6BhdRkqt3&client_secret= 1261 47HDu8s&username=johndoe&password=A3ddj3w 1263 The authorization server MUST validate the client credentials and end 1264 user credentials and if valid issue an access token and deliver to 1265 the client in the HTTP response body using the 1266 "application/x-www-form-urlencoded" content type as defined by 1267 [W3C.REC-html40-19980424] with a 200 status code (OK). 1269 The response contains the following parameters: 1271 access_token 1272 REQUIRED. The access token. 1274 expires_in 1275 OPTIONAL. The duration in seconds of the access token 1276 lifetime. 1278 refresh_token 1279 OPTIONAL. The refresh token. 1281 access_token_secret 1282 REQUIRED if requested by the client. The corresponding access 1283 token secret as requested by the client. 1285 For example: 1287 HTTP/1.1 200 OK 1288 Content-Type: application/x-www-form-urlencoded 1290 access_token=FJQbwq9OD8&refresh_token=gO3CHNqpH8 1292 If the request is invalid, the authorization server returns an error 1293 message in the HTTP response body using the 1294 "application/x-www-form-urlencoded" content type as defined by 1295 [W3C.REC-html40-19980424] with a 400 status code (Bad Request). 1297 The response contains the following parameter: 1299 error 1300 OPTIONAL. The parameter value MUST be set to either 1301 "incorrect_credentials" or "unauthorized_client" (case 1302 sensitive). 1304 For example: 1306 HTTP/1.1 400 Bad Request 1307 Content-Type: application/x-www-form-urlencoded 1309 error=incorrect_credentials 1311 3.7. Autonomous Client Flows 1313 Autonomous client flows are used to grant client access to protected 1314 resources controlled by the client (i.e. the client is the resource 1315 owner). For example, these flows are useful when a service provides 1316 both client-specific resources in addition to end user resources. 1318 3.7.1. Client Credentials Flow 1320 The client credentials flow is used when the client acts autonomously 1321 without acting on behalf of a separate resource owner. The client 1322 secret is assumed to be high-entropy since it is not designed to be 1323 memorize by an end user. 1325 +--------+ +---------------+ 1326 | | | | 1327 | |>--(A)--- Client Credentials ---->| Authorization | 1328 | Client | | Server | 1329 | |<--(B)---- Access Token ---------<| | 1330 | | (w/ Optional Refresh Token) | | 1331 +--------+ +---------------+ 1333 Figure 7 1335 The client credential flow illustrated in Figure 7 includes the 1336 following steps: 1338 (A) The client sends an access token request to the authorization 1339 server and includes its client identifier and client secret. 1341 (B) The authorization server validates the client credentials and 1342 issues an access token. 1344 3.7.1.1. Client Requests Access Token 1346 The client requests an access token by making an HTTP "POST" request 1347 to the token endpoint. The client constructs a request URI by adding 1348 the following parameters to the request: 1350 type 1351 REQUIRED. The parameter value MUST be set to 'client_cred' 1352 (case sensitive). 1354 client_id 1355 REQUIRED. The client identifier as described in Section 3.4. 1357 client_secret 1358 REQUIRED. The client secret as described in Section 3.4. 1360 secret_type 1361 OPTIONAL. The access token secret type as described by 1362 Section 5.3. If omitted, the authorization server will issue a 1363 bearer token (an access token without a matching secret) as 1364 described by Section 5.2. 1366 For example, the client makes the following HTTPS request (line 1367 breaks are for display purposes only): 1369 POST /token HTTP/1.1 1370 Host: server.example.com 1372 type=client_cred&client_id=s6BhdRkqt3&client_secret=47HDu8s 1374 The authorization server MUST validate the client credentials and if 1375 valid issue an access token and deliver to the client in the HTTP 1376 response body using the "application/x-www-form-urlencoded" content 1377 type as defined by [W3C.REC-html40-19980424] with a 200 status code 1378 (OK). 1380 The response contains the following parameters: 1382 access_token 1383 REQUIRED. The access token. 1385 expires_in 1386 OPTIONAL. The duration in seconds of the access token 1387 lifetime. 1389 refresh_token 1390 OPTIONAL. The refresh token. 1392 access_token_secret 1393 REQUIRED if requested by the client. The corresponding access 1394 token secret as requested by the client. 1396 For example: 1398 HTTP/1.1 200 OK 1399 Content-Type: application/x-www-form-urlencoded 1401 access_token=FJQbwq9OD8 1403 If the request is invalid, the authorization server returns an error 1404 message in the HTTP response body using the 1405 "application/x-www-form-urlencoded" content type as defined by 1406 [W3C.REC-html40-19980424] with a 400 status code (Bad Request). 1408 The response contains the following parameter: 1410 error 1411 OPTIONAL. The parameter value MUST be set to either 1412 "incorrect_credentials" or "unauthorized_client" (case 1413 sensitive). 1415 For example: 1417 HTTP/1.1 400 Bad Request 1418 Content-Type: application/x-www-form-urlencoded 1420 error=incorrect_credentials 1422 3.7.2. Assertion Flow 1424 The assertion flow requires the client to obtain a assertion such as 1425 a SAML [OASIS.saml-core-2.0-os] assertion from an assertion issuer 1426 prior to initiating the flow. The process in which the assertion is 1427 obtained is defined by the assertion issuer and the authorization 1428 server, and is beyond the scope of this specification. 1430 The client credentials flow is used when the client acts autonomously 1431 without acting on behalf of a separate resource owner. 1433 +--------+ +---------------+ 1434 | | | | 1435 | |>--(A)------ Assertion ---------->| Authorization | 1436 | Client | | Server | 1437 | |<--(B)---- Access Token ---------<| | 1438 | | (w/ Optional Refresh Token) | | 1439 +--------+ +---------------+ 1441 Figure 8 1443 The client credential flow illustrated in Figure 8 includes the 1444 following steps: 1446 (A) The client sends an access token request to the authorization 1447 server and includes an assertion. 1449 (B) The authorization server validates the assertion and issues an 1450 access token. 1452 3.7.2.1. Client Requests Access Token 1454 The client requests an access token by making an HTTP "POST" request 1455 to the token endpoint. The client constructs a request URI by adding 1456 the following parameters to the request: 1458 type 1459 REQUIRED. The parameter value MUST be set to 'assertion' (case 1460 sensitive). 1462 format 1463 REQUIRED. The format of the assertion as defined by the 1464 authorization server. 1466 assertion 1467 REQUIRED. The assertion. 1469 secret_type 1470 OPTIONAL. The access token secret type as described by 1471 Section 5.3. If omitted, the authorization server will issue a 1472 bearer token (an access token without a matching secret) as 1473 described by Section 5.2. 1475 For example, the client makes the following HTTPS request (line 1476 breaks are for display purposes only): 1478 POST /token HTTP/1.1 1479 Host: server.example.com 1481 type=assertion&format=_______&assertion=_______ 1483 The authorization server MUST validate the assertion and if valid 1484 issue an access token and deliver to the client in the HTTP response 1485 body using the "application/x-www-form-urlencoded" content type as 1486 defined by [W3C.REC-html40-19980424] with a 200 status code (OK). 1488 The response contains the following parameters: 1490 access_token 1491 REQUIRED. The access token. 1493 expires_in 1494 OPTIONAL. The duration in seconds of the access token 1495 lifetime. 1497 refresh_token 1498 OPTIONAL. The refresh token. 1500 access_token_secret 1501 REQUIRED if requested by the client. The corresponding access 1502 token secret as requested by the client. 1504 For example: 1506 HTTP/1.1 200 OK 1507 Content-Type: application/x-www-form-urlencoded 1509 access_token=FJQbwq9OD8 1511 If the assertion is invalid, the authorization server returns an 1512 error message in the HTTP response body using the 1513 "application/x-www-form-urlencoded" content type as defined by 1514 [W3C.REC-html40-19980424] with a 400 status code (Bad Request). 1516 The response contains the following parameter: 1518 error 1519 OPTIONAL. The parameter value MUST be set to either 1520 "invalid_assertion" or "unknown_format" (case sensitive). 1522 For example: 1524 HTTP/1.1 400 Bad Request 1525 Content-Type: application/x-www-form-urlencoded 1527 error=incorrect_credentials 1529 Authorization servers SHOULD issue access tokens with a limited 1530 lifetime and require clients to refresh them by requesting a new 1531 access token using the same assertion if it is still valid. 1532 Otherwise the client MUST obtain a new valid assertion. 1534 4. Refreshing an Access Token 1536 Token refresh is used when the lifetime of an access token is shorter 1537 than the lifetime of the authorization grant. It allows clients to 1538 obtain a new access token without having to go through the 1539 authorization flow again or involve the resource owner. It is also 1540 used to obtain a new token with different security properties (e.g. 1541 bearer token, token with shared symmetric secret). 1543 +--------+ Client Credentials, +---------------+ 1544 | | Refresh Token, | | 1545 | |>--(A)----- & Secret Type ------->| Authorization | 1546 | Client | | Server | 1547 | |<--(B)----- Access Token --------<| | 1548 | | & Optional Secret | | 1549 +--------+ +---------------+ 1551 Figure 9 1553 To refresh a token, the client constructs an HTTP "POST" request to 1554 the token endpoint and includes the following parameters in the HTTP 1555 request body using the "application/x-www-form-urlencoded" content 1556 type as defined by [W3C.REC-html40-19980424]: 1558 type 1559 REQUIRED. The parameter value MUST be set to 'refresh' (case 1560 sensitive). 1562 client_id 1563 REQUIRED. The client identifier as described in Section 3.4. 1565 client_secret 1566 REQUIRED if the client was issued a secret. The client secret. 1568 refresh_token 1569 REQUIRED. The refresh token associated with the access token 1570 to be refreshed. 1572 secret_type 1573 OPTIONAL. The access token secret type as described by 1574 Section 5.3. If omitted, the authorization server will issue a 1575 bearer token (an access token without a matching secret) as 1576 described by Section 5.2. 1578 For example, the client makes the following HTTPS request (line break 1579 are for display purposes only): 1581 POST /authorize HTTP/1.1 1582 Host: server.example.com 1583 Content-Type: application/x-www-form-urlencoded 1585 type=refresh_token&client_id=s6BhdRkqt3&client_secret=8eSEIpnqmM 1586 &refresh_token=n4E9O119d&secret_type=hmac-sha256 1588 The authorization server MUST verify the client credential, the 1589 validity of the refresh token, and that the resource owner's 1590 authorization is still valid. If the request is valid, the 1591 authorization server issues a new access token and includes the 1592 following parameters in the HTTP response body using the 1593 "application/x-www-form-urlencoded" content type as defined by 1594 [W3C.REC-html40-19980424] with a 200 status code (OK): 1596 access_token 1597 REQUIRED. The access token. 1599 expires_in 1600 OPTIONAL. The duration in seconds of the access token 1601 lifetime. 1603 access_token_secret 1604 REQUIRED if requested by the client. The corresponding access 1605 token secret as requested by the client. 1607 For example: 1609 HTTP/1.1 200 OK 1610 Content-Type: application/x-www-form-urlencoded 1612 access_token=8F44J2HGMl&access_token_secret=hfd83hjd&expires_in=3600 1614 If the request fails verification, the authorization server returns 1615 an error message in the HTTP response body using the 1616 "application/x-www-form-urlencoded" content type as defined by 1617 [W3C.REC-html40-19980424] with a 400 status code (Bad Request). 1619 The response contains the following parameter: 1621 error 1622 OPTIONAL. The parameter value MUST be set to either 1623 "incorrect_credentials", "authorization_expired", or 1624 "unsupported_secret_type" (case sensitive). 1626 For example: 1628 HTTP/1.1 400 Bad Request 1629 Content-Type: application/x-www-form-urlencoded 1631 error=incorrect_credentials 1633 5. Accessing a Protected Resource 1635 Clients access protected resources by presenting an access token to 1636 the resource server. The methods used by the resource server to 1637 validate the access token are beyond the scope of this specification, 1638 but generally involve an interaction or coordination between the 1639 resource server and authorization server. 1641 The method in which a client uses an access token depends on the 1642 security properties of the access tokens. By default, access tokens 1643 are issued without a matching secret. Clients MAY request an access 1644 token with a matchin secret by specifying the desired secret type 1645 using the "secret_type" token request parameter. 1647 When an access token does not include a matching secret, the access 1648 token acts as a bearer token, where the token string is a shared 1649 symmetric secret. This requires treating the access token with the 1650 same care as other secrets (e.g. user passwords). Access tokens 1651 SHOULD NOT be sent in the clear over an insecure channel. 1653 However, when it is necessary to transmit bearer tokens in the clear 1654 without a secure channel, authorization servers must issue access 1655 tokens with limited scope and lifetime to reduce the potential risk 1656 from a compromised access token. Clients SHOULD request and utilize 1657 an access token with a matching secret when making protected resource 1658 requests over an insecure channel (e.g. an HTTP request without using 1659 SSL/TLS). 1661 When an access token includes a matching secret, the secret is not 1662 included directly in the request but is used instead to generate a 1663 cryptographic signature of the request. The signature can only be 1664 generated and verified by entities with access to the secret. 1666 Clients SHOULD NOT make authenticated requests with an access token 1667 to unfamiliar resource servers, especially when using bearer tokens, 1668 regardless of the presence of a secure channel. 1670 5.1. The Authorization Request Header 1672 The "Authorization" request header field is used by clients to make 1673 both bearer token and cryptographic token requests. When making 1674 bearer token requests, the client uses the "token" attribute to 1675 include the access token in the request without any of the other 1676 attributes. Additional methods for making bearer token requests are 1677 described in Section 5.2. 1679 For example: 1681 GET /resource HTTP/1.1 1682 Host: server.example.com 1683 Authorization: Token token="vF9dft4qmT" 1685 When making a cryptographic token request (using an access token with 1686 a matching secret) the client uses the "token" attribute to include 1687 the access token in the request, and uses the "nonce", "timestamp", 1688 "algorithm", and "signature" attributes to apply the matching secret. 1690 For example: 1692 GET /resource HTTP/1.1 1693 Host: server.example.com 1694 Authorization: Token token="vF9dft4qmT", 1695 nonce="s8djwd", 1696 timestamp="137131200", 1697 algorithm="hmac-sha256", 1698 signature="wOJIO9A2W5mFwDgiDvZbTSMK/PY=" 1700 The "Authorization" header field uses the framework defined by 1701 [RFC2617] as follows: 1703 credentials = "Token" RWS token-response 1705 token-response = token-id 1706 [ CS nonce ] 1707 [ CS timestamp ] 1708 [ CS algorithm ] 1709 [ CS signature ] 1711 token-id = "token" "=" <"> token <"> 1712 timestamp = "timestamp" "=" <"> 1*DIGIT <"> 1713 nonce = "nonce" "=" <"> token <"> 1715 algorithm = "algorithm" "=" algorithm-name 1716 algorithm-name = "hmac-sha256" / 1717 token 1719 signature = "signature" "=" <"> token <"> 1721 5.2. Bearer Token Requests 1723 Clients make bearer token requests by including the access token 1724 using the HTTP "Authorization" request header with the "Token" 1725 authentication scheme as described in Section 5.1. The access token 1726 is included using the "token" parameter. 1728 For example, the client makes the following HTTPS request: 1730 GET /resource HTTP/1.1 1731 Host: server.example.com 1732 Authorization: Token token="vF9dft4qmT" 1734 The resource server MUST validate the access token and ensure it has 1735 not expired and that its scope covers the requested resource. If the 1736 token expired or is invalid, the resource server MUST reply with an 1737 HTTP 401 status code (Unauthorized) and include the HTTP 1738 "WWW-Authenticate" response header as described in Section 6.1. 1740 For example: 1742 HTTP/1.1 401 Unauthorized 1743 WWW-Authenticate: Token realm='Service', error='token_expired' 1745 Alternatively, the client MAY include the access token using the HTTP 1746 request URI in the query component as described in Section 5.2.1, or 1747 in the HTTP body when using the "application/x-www-form-urlencoded" 1748 content type as described in Section 5.2.2. Clients SHOULD only use 1749 the request URI or body when the "Authorization" request header is 1750 not available, and MUST NOT use more than one method in each request. 1752 5.2.1. URI Query Parameter 1754 When including the access token in the HTTP request URI, the client 1755 adds the access token to the request URI query component as defined 1756 by [RFC3986] using the "oauth_token" parameter. 1758 For example, the client makes the following HTTPS request: 1760 GET /resource?oauth_token=vF9dft4qmT HTTP/1.1 1761 Host: server.example.com 1763 The HTTP request URI query can include other request-specific 1764 parameters, in which case, the "oauth_token" parameters SHOULD be 1765 appended following the request-specific parameters, properly 1766 separated by an "&" character (ASCII code 38). 1768 The resource server MUST validate the access token and ensure it has 1769 not expired and its includes the requested resource. If the resource 1770 expired or is not valid, the resource server MUST reply with an HTTP 1771 401 status code (Unauthorized) and include the HTTP 1772 "WWW-Authenticate" response header as described in Section 6.1. 1774 5.2.2. Form-Encoded Body Parameter 1776 When including the access token in the HTTP request entity-body, the 1777 client adds the access token to the request body using the 1778 "oauth_token" parameter. The client can use this method only if the 1779 following REQUIRED conditions are met: 1781 o The entity-body is single-part. 1783 o The entity-body follows the encoding requirements of the 1784 "application/x-www-form-urlencoded" content-type as defined by 1785 [W3C.REC-html40-19980424]. 1787 o The HTTP request entity-header includes the "Content-Type" header 1788 field set to "application/x-www-form-urlencoded". 1790 o The HTTP request method is "POST", "PUT", or "DELETE". 1792 The entity-body can include other request-specific parameters, in 1793 which case, the "oauth_token" parameters SHOULD be appended following 1794 the request-specific parameters, properly separated by an "&" 1795 character (ASCII code 38). 1797 For example, the client makes the following HTTPS request: 1799 POST /resource HTTP/1.1 1800 Host: server.example.com 1801 Content-Type: application/x-www-form-urlencoded 1803 oauth_token=vF9dft4qmT 1805 The resource server MUST validate the access token and ensure it has 1806 not expired and its includes the requested resource. If the resource 1807 expired or is not valid, the resource server MUST reply with an HTTP 1808 401 status code (Unauthorized) and include the HTTP 1809 "WWW-Authenticate" response header as described in Section 6.1. 1811 5.3. Cryptographic Tokens Requests 1813 Clients make authenticated protected resource requests using an 1814 access token with a matching secret by calculating a set of values 1815 and including them in the request using the "Authorization" header 1816 field. The way clients calculate these values depends on the access 1817 token secret type as issued by the authorization server. 1819 This specification defines the "hmac-sha256" algorithm, and 1820 establishes a registry for providing additional algorithms. Clients 1821 obtain an access token with a matchin "hmac-sha256" secret by using 1822 the "token_type" parameter when requesting an access token. 1824 5.3.1. The 'hmac-sha256' Algorithm 1826 The "hmac-sha256" algorithm uses the HMAC method as defined in 1827 [RFC2104] together with the SHA-256 hash function defined in [NIST 1828 FIPS-180-3] to apply the access token secret to the request and 1829 generate a signature value that is included in the request instead of 1830 transmitting the secret in the clear. 1832 To use the "hmac-sha256" algorithm, clients: 1834 1. Calculate the request timestamp and generate a request nonce as 1835 described in Section 5.3.1.1. 1837 2. Construct the normalized request string as described in 1838 Section 5.3.1.2. 1840 3. Calculate the request signature as described in Section 5.3.1.3. 1842 4. Include the timestamp, nonce, algorithm name, and calculated 1843 signature in the request using the "Authorization" header field. 1845 For example: 1847 GET /resource HTTP/1.1 1848 Host: server.example.com 1849 Authorization: Token token="vF9dft4qmT", 1850 nonce="s8djwd", 1851 timestamp="137131200", 1852 algorithm="hmac-sha256", 1853 signature="wOJIO9A2W5mFwDgiDvZbTSMK/PY=" 1855 The resource server MUST validate the access token and ensure it has 1856 not expired and that its scope covers the requested resource. The 1857 resource server MUST also recalculate the request signature using the 1858 attributes provided by the client and compare it to the signature 1859 provided. If the token expired or is invalid, or if the signature is 1860 incorrect, the resource server MUST reply with an HTTP 401 status 1861 code (Unauthorized) and include the HTTP "WWW-Authenticate" response 1862 header as described in Section 6.1. 1864 For example: 1866 HTTP/1.1 401 Unauthorized 1867 Date: Tue, 15 Nov 2010 08:12:31 GMT 1868 WWW-Authenticate: Token realm='Service', 1869 algorithms='hmac-sha256', 1870 error='invalid_signature' 1872 [[ Errors list ]] 1874 5.3.1.1. Nonce and Timestamp 1876 A timestamp in combination with unique nonce values is used to 1877 protect against replay attacks when transmitted over an insecure 1878 channel. 1880 The nonce is a random string, uniquely generated by the client to 1881 allow the resource server to verify that a request has never been 1882 made before and helps prevent replay attacks when requests are made 1883 over a non-secure channel. The nonce value MUST be unique across all 1884 requests with the same timestamp and token combinations. 1886 The timestamp value is the current time expressed in the number of 1887 seconds since January 1, 1970 00:00:00 GMT, and MUST be a positive 1888 integer. 1890 To avoid the need to retain an infinite number of nonce values for 1891 future checks, resource servers MAY choose to restrict the time 1892 period after which a request with an old timestamp is rejected. When 1893 resource servers apply such a restriction, clients SHOULD synchronize 1894 their clocks by using the resource server's time as indicated by the 1895 HTTP "Date" response header field as defined in [RFC2616]. 1897 5.3.1.2. Normalized String Construction 1899 The normalized request string is a consistent, reproducible 1900 concatenation of several of the HTTP request elements into a single 1901 string. The string is used as an input to the selected cryptographic 1902 method and includes the HTTP request method (e.g. "GET", "POST", 1903 etc.), the authority as declared by the HTTP "Host" request header, 1904 and the request resource URI. 1906 The normalized request string does not cover the entire HTTP request. 1907 Most notably, it does not include the entity-body or most HTTP 1908 entity-headers. It is important to note that the resource server 1909 cannot verify the authenticity of the excluded request elements 1910 without using additional protections such as SSL/TLS. 1912 The normalized request string is constructed by concatenating 1913 together, in order, the following HTTP request elements, separated by 1914 the "," character (ASCII code 44): 1916 1. The request timestamp as described in Section 5.3.1.1. 1918 2. The request nonce as described in Section 5.3.1.1. 1920 3. The cryptographic algorithm used. 1922 4. The HTTP request method in uppercase. For example: "HEAD", 1923 "GET", "POST", etc. 1925 5. The hostname, colon-separated (ASCII code 58) from the TCP port 1926 used to make the request as included in the HTTP request "Host" 1927 header field. The port MUST be included even if it is not 1928 included in the "Host" header field (i.e. the default port for 1929 the scheme). 1931 6. The request resource URI. 1933 For example, the normalized request string for the "GET" request URI 1934 "http://example.com/resource", request timestamp "137131200", request 1935 nonce "s8djwd", and "hmac-sha256" algorithm (line breaks are for 1936 display purposes only): 1938 137131200,s8djwd,hmac-sha256,GET,example.com:80, 1939 http://example.com/resource 1941 5.3.1.3. Signature Calculation 1943 Clients calculate the request signature using the HMAC-SHA256 1944 function: 1946 digest = HMAC-SHA256 (key, text) 1948 by setting the function variables are follows: 1950 text 1951 is set to the value of the normalize request string as 1952 described in Section 5.3.1.2. 1954 key 1955 is set to the access token secret. 1957 The request signature is the calculated value of the "digest" 1958 variable after the result octet string is base64-encoded per 1959 [RFC2045] section 6.8. 1961 6. Identifying a Protected Resource 1963 Clients access protected resources after locating the appropriate 1964 authorization and token endpoints and obtaining an access token. In 1965 many cases, interacting with a protected resource requires prior 1966 knowledge of the protected resource properties and methods, as well 1967 as its authentication requirements (i.e. establishing client 1968 identity, locating the authorization and token endpoints). 1970 However, there are cases in which clients are unfamiliar with the 1971 protected resource, including whether the resource requires 1972 authentication. When clients attempt to access an unfamiliar 1973 protected resource without an access token, the resource server 1974 denies the request and informs the client of the required credentials 1975 using an HTTP authentication challenge. 1977 In addition, when receiving an invalid authenticated request, the 1978 resource server issues an authentication challenge including the 1979 error type and message. 1981 6.1. The WWW-Authenticate Response Header 1983 A resource server receiving a request for a protected resource 1984 without a valid access token MUST respond with a 401 HTTP status code 1985 (Unauthorized), and includes at least one "Token" "WWW-Authenticate" 1986 response header field challenge. 1988 The "WWW-Authenticate" header field uses the framework defined by 1989 [RFC2617] as follows: 1991 challenge = "Token" RWS token-challenge 1993 token-challenge = realm 1994 [ CS authz-uri ] 1995 [ CS token-uri ] 1996 [ CS algorithms ] 1997 [ CS error ] 1999 authz-uri = "auth-uri" "=" URI-Reference 2000 token-uri = "token-uri" "=" URI-Reference 2001 algorithms = "algorithms" "=" <"> 1#algorithm-name <"> 2002 error = "error" "=" <"> token <"> 2004 CS = OWS "," OWS 2006 6.1.1. The 'realm' Attribute 2008 The "realm" attribute is used to provide the protected resources 2009 partition as defined by [RFC2617]. 2011 6.1.2. The 'authorization-uri' Attribute 2013 6.1.3. The 'algorithms' Attribute 2015 6.1.4. The 'error' Attribute 2017 7. Security Considerations 2019 [[ Todo ]] 2021 8. IANA Considerations 2023 [[ Not Yet ]] 2025 9. Acknowledgements 2027 [[ Add OAuth 1.0a authors + WG contributors ]] 2029 Appendix A. Differences from OAuth 1.0a 2031 [[ Todo ]] 2033 Appendix B. Document History 2035 [[ to be removed by RFC editor before publication as an RFC ]] 2037 -00 2039 o Initial draft based on a combination of WRAP and OAuth 1.0a. 2041 10. References 2043 10.1. Normative References 2045 [I-D.ietf-httpbis-p1-messaging] 2046 Fielding, R., Gettys, J., Mogul, J., Nielsen, H., 2047 Masinter, L., Leach, P., Berners-Lee, T., and J. Reschke, 2048 "HTTP/1.1, part 1: URIs, Connections, and Message 2049 Parsing", draft-ietf-httpbis-p1-messaging-09 (work in 2050 progress), March 2010. 2052 [NIST FIPS-180-3] 2053 National Institute of Standards and Technology, "Secure 2054 Hash Standard (SHS). FIPS PUB 180-3, October 2008". 2056 [RFC2045] Freed, N. and N. Borenstein, "Multipurpose Internet Mail 2057 Extensions (MIME) Part One: Format of Internet Message 2058 Bodies", RFC 2045, November 1996. 2060 [RFC2104] Krawczyk, H., Bellare, M., and R. Canetti, "HMAC: Keyed- 2061 Hashing for Message Authentication", RFC 2104, 2062 February 1997. 2064 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 2065 Requirement Levels", BCP 14, RFC 2119, March 1997. 2067 [RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., 2068 Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext 2069 Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999. 2071 [RFC2617] Franks, J., Hallam-Baker, P., Hostetler, J., Lawrence, S., 2072 Leach, P., Luotonen, A., and L. Stewart, "HTTP 2073 Authentication: Basic and Digest Access Authentication", 2074 RFC 2617, June 1999. 2076 [RFC2818] Rescorla, E., "HTTP Over TLS", RFC 2818, May 2000. 2078 [RFC3447] Jonsson, J. and B. Kaliski, "Public-Key Cryptography 2079 Standards (PKCS) #1: RSA Cryptography Specifications 2080 Version 2.1", RFC 3447, February 2003. 2082 [RFC3629] Yergeau, F., "UTF-8, a transformation format of ISO 2083 10646", STD 63, RFC 3629, November 2003. 2085 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 2086 Resource Identifier (URI): Generic Syntax", STD 66, 2087 RFC 3986, January 2005. 2089 [W3C.REC-html40-19980424] 2090 Hors, A., Raggett, D., and I. Jacobs, "HTML 4.0 2091 Specification", World Wide Web Consortium 2092 Recommendation REC-html40-19980424, April 1998, 2093 . 2095 10.2. Informative References 2097 [I-D.hammer-oauth] 2098 Hammer-Lahav, E., "The OAuth 1.0 Protocol", 2099 draft-hammer-oauth-10 (work in progress), February 2010. 2101 [I-D.hardt-oauth] 2102 Hardt, D., Tom, A., Eaton, B., and Y. Goland, "OAuth Web 2103 Resource Authorization Profiles", draft-hardt-oauth-01 2104 (work in progress), January 2010. 2106 [OASIS.saml-core-2.0-os] 2107 Cantor, S., Kemp, J., Philpott, R., and E. Maler, 2108 "Assertions and Protocol for the OASIS Security Assertion 2109 Markup Language (SAML) V2.0", OASIS Standard saml-core- 2110 2.0-os, March 2005. 2112 Authors' Addresses 2114 Eran Hammer-Lahav (editor) 2115 Yahoo! 2117 Email: eran@hueniverse.com 2119 David Recordon 2120 Facebook 2122 Email: davidrecordon@facebook.com 2123 URI: http://www.davidrecordon.com/ 2124 Dick Hardt 2126 Email: dick.hardt@gmail.com 2127 URI: http://dickhardt.org/