网页 综合 更新时间 2015-05-19 00:00:00

RFC 7519: JSON Web Token (JWT) | RFC Editor

自动蜘蛛 www.rfc-editor.org 正文约 6000 字
RFC 7519: JSON Web Token (JWT) | RFC Editor
Skip to content Primary navigationThe RFC SeriesFor AuthorsAbout UsHomeRFC 7519 View as: Plain Text, Compact HTML Info RFC 7519: JSON Web Token (JWT)JSONJOSEJWTMay 2015. M. Jones, J. Bradley, N. SakimuraProposed StandardSubscribe34 subscribed Add to Set Added to 10 Sets Read aloud This RFC was updated, see RFC 7797, RFC 8725.Internet Engineering Task Force (IETF) M. Jones Request for Comments: 7519 Microsoft Category: Standards Track J. Bradley ISSN: 2070-1721 Ping Identity N. Sakimura NRI May 2015 JSON Web Token (JWT) Abstract JSON Web Token (JWT) is a compact, URL-safe means of representing claims to be transferred between two parties. The claims in a JWT are encoded as a JSON object that is used as the payload of a JSON Web Signature (JWS) structure or as the plaintext of a JSON Web Encryption (JWE) structure, enabling the claims to be digitally signed or integrity protected with a Message Authentication Code (MAC) and/or encrypted. Status of This Memo This is an Internet Standards Track document. This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in Section 2 of RFC 5741. Information about the current status of this document, any errata, and how to provide feedback on it may be obtained at http://www.rfc-editor.org/info/rfc7519. Jones, et al. Standards Track [Page 1] RFC 7519 JSON Web Token (JWT) May 2015 Copyright Notice Copyright (c) 2015 IETF Trust and the persons identified as the document authors. All rights reserved. This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License. Jones, et al. Standards Track [Page 2] RFC 7519 JSON Web Token (JWT) May 2015 Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 4 1.1. Notational Conventions . . . . . . . . . . . . . . . . . 4 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 4 3. JSON Web Token (JWT) Overview . . . . . . . . . . . . . . . . 6 3.1. Example JWT . . . . . . . . . . . . . . . . . . . . . . . 7 4. JWT Claims . . . . . . . . . . . . . . . . . . . . . . . . . 8 4.1. Registered Claim Names . . . . . . . . . . . . . . . . . 9 4.1.1. "iss" (Issuer) Claim . . . . . . . . . . . . . . . . 9 4.1.2. "sub" (Subject) Claim . . . . . . . . . . . . . . . . 9 4.1.3. "aud" (Audience) Claim . . . . . . . . . . . . . . . 9 4.1.4. "exp" (Expiration Time) Claim . . . . . . . . . . . . 9 4.1.5. "nbf" (Not Before) Claim . . . . . . . . . . . . . . 10 4.1.6. "iat" (Issued At) Claim . . . . . . . . . . . . . . . 10 4.1.7. "jti" (JWT ID) Claim . . . . . . . . . . . . . . . . 10 4.2. Public Claim Names . . . . . . . . . . . . . . . . . . . 10 4.3. Private Claim Names . . . . . . . . . . . . . . . . . . . 10 5. JOSE Header . . . . . . . . . . . . . . . . . . . . . . . . . 11 5.1. "typ" (Type) Header Parameter . . . . . . . . . . . . . . 11 5.2. "cty" (Content Type) Header Parameter . . . . . . . . . . 11 5.3. Replicating Claims as Header Parameters . . . . . . . . . 12 6. Unsecured JWTs . . . . . . . . . . . . . . . . . . . . . . . 12 6.1. Example Unsecured JWT . . . . . . . . . . . . . . . . . . 12 7. Creating and Validating JWTs . . . . . . . . . . . . . . . . 13 7.1. Creating a JWT . . . . . . . . . . . . . . . . . . . . . 13 7.2. Validating a JWT . . . . . . . . . . . . . . . . . . . . 14 7.3. String Comparison Rules . . . . . . . . . . . . . . . . . 15 8. Implementation Requirements . . . . . . . . . . . . . . . . . 16 9. URI for Declaring that Content is a JWT . . . . . . . . . . . 17 10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 17 10.1. JSON Web Token Claims Registry . . . . . . . . . . . . . 17 10.1.1. Registration Template . . . . . . . . . . . . . . . 18 10.1.2. Initial Registry Contents . . . . . . . . . . . . . 18 10.2. Sub-Namespace Registration of urn:ietf:params:oauth:token-type:jwt . . . . . . . . . . 19 10.2.1. Registry Contents . . . . . . . . . . . . . . . . . 19 10.3. Media Type Registration . . . . . . . . . . . . . . . . 20 10.3.1. Registry Contents . . . . . . . . . . . . . . . . . 20 10.4. Header Parameter Names Registration . . . . . . . . . . 20 10.4.1. Registry Contents . . . . . . . . . . . . . . . . . 21 11. Security Considerations . . . . . . . . . . . . . . . . . . . 21 11.1. Trust Decisions . . . . . . . . . . . . . . . . . . . . 21 11.2. Signing and Encryption Order . . . . . . . . . . . . . . 21 12. Privacy Considerations . . . . . . . . . . . . . . . . . . . 22 13. References . . . . . . . . . . . . . . . . . . . . . . . . . 22 13.1. Normative References . . . . . . . . . . . . . . . . . . 22 13.2. Informative References . . . . . . . . . . . . . . . . . 23 Jones, et al. Standards Track [Page 3] RFC 7519 JSON Web Token (JWT) May 2015 Appendix A. JWT Examples . . . . . . . . . . . . . . . . . . . . 26 A.1. Example Encrypted JWT . . . . . . . . . . . . . . . . . . 26 A.2. Example Nested JWT . . . . . . . . . . . . . . . . . . . 26 Appendix B. Relationship of JWTs to SAML Assertions . . . . . . 28 Appendix C. Relationship of JWTs to Simple Web Tokens (SWTs) . . 28 Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 28 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 29 1. Introduction JSON Web Token (JWT) is a compact claims representation format intended for space constrained environments such as HTTP Authorization h
访问原文 返回搜索 https://www.rfc-editor.org/info/rfc7519
本页为82搜索生成的网页快照,内容来自站内索引;演示数据的原文链接仅作示例。