diff --git a/docs/changelog.rst b/docs/changelog.rst index 743337c..6a131ef 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -12,6 +12,13 @@ Changelog .. module:: joserfc :noindex: +1.0.0 +----- + +**Released on July 14, 2024** + +- Fix type hints for strict mode. + 0.12.0 ------ diff --git a/docs/locales/zh/LC_MESSAGES/api.po b/docs/locales/zh/LC_MESSAGES/api.po index 16280a7..f391dd9 100644 --- a/docs/locales/zh/LC_MESSAGES/api.po +++ b/docs/locales/zh/LC_MESSAGES/api.po @@ -6,9 +6,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: joserfc 0.5.0\n" +"Project-Id-Version: joserfc\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-06-15 13:31+0900\n" +"POT-Creation-Date: 2024-07-14 18:27+0900\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language: zh\n" @@ -21,17 +21,17 @@ msgstr "" #: ../../api/errors.rst:2 msgid "Errors" -msgstr "" +msgstr "错误类型" #: ../../api/errors.rst:4 msgid "All errors are based on ``joserfc.errors.JoseError``." -msgstr "" +msgstr "所以的错误类型都是基于``joserfc.errors.JoseError``。" #: joserfc.errors.BadSignatureError:1 of msgid "" "This error is designed for JWS/JWT. It is raised when signature does not " "match." -msgstr "" +msgstr "该错误是为 JWS/JWT 设计的,当签名不匹配时触发。" #: ../../docstring joserfc.errors.BadSignatureError.error:1 #: joserfc.errors.ConflictAlgorithmError.error:1 @@ -343,7 +343,7 @@ msgstr "" #: joserfc.rfc7515.model.JWSAlgModel.sign #: joserfc.rfc7515.model.JWSAlgModel.verify of msgid "Returns" -msgstr "" +msgstr "返回值" #: joserfc.jwe.decrypt_compact:19 of msgid "object of the ``CompactEncryption``" @@ -561,7 +561,7 @@ msgid "" msgstr "" #: joserfc.rfc7515.model.FlattenedJSONSignature:1 of -msgid "\"JSON Signature object that represents a flattened JSON serialization." +msgid "JSON Signature object that represents a flattened JSON serialization." msgstr "" #: ../../docstring joserfc.jws.FlattenedJSONSignature.flattened:1 of @@ -578,7 +578,7 @@ msgid "payload content" msgstr "" #: joserfc.rfc7515.model.GeneralJSONSignature:1 of -msgid "\"JSON Signature object that represents a general JSON serialization." +msgid "JSON Signature object that represents a general JSON serialization." msgstr "" #: ../../docstring joserfc.jws.GeneralJSONSignature.flattened:1 of @@ -913,4 +913,3 @@ msgstr "" #: joserfc.jwt.encode:5 of msgid "key used to sign the signature" msgstr "" - diff --git a/docs/locales/zh/LC_MESSAGES/changelog.po b/docs/locales/zh/LC_MESSAGES/changelog.po index d329ece..8522a27 100644 --- a/docs/locales/zh/LC_MESSAGES/changelog.po +++ b/docs/locales/zh/LC_MESSAGES/changelog.po @@ -6,9 +6,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: joserfc 0.5.0\n" +"Project-Id-Version: joserfc\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-06-15 13:31+0900\n" +"POT-Creation-Date: 2024-07-14 18:27+0900\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language: zh\n" @@ -28,281 +28,293 @@ msgid "Here is the history of joserfc_ package releases." msgstr "这里记录了 joserfc_ 的发布历史。" #: ../../changelog.rst:16 -msgid "0.12.0" +msgid "1.0.0" msgstr "" #: ../../changelog.rst:18 -msgid "**Released on June 15, 2024**" +msgid "**Released on July 14, 2024**" msgstr "" #: ../../changelog.rst:20 +msgid "Fix type hints for strict mode." +msgstr "" + +#: ../../changelog.rst:23 +msgid "0.12.0" +msgstr "" + +#: ../../changelog.rst:25 +msgid "**Released on June 15, 2024**" +msgstr "" + +#: ../../changelog.rst:27 msgid "Limit DEF decompress size to 250k bytes." msgstr "" -#: ../../changelog.rst:21 +#: ../../changelog.rst:28 msgid "Fix claims validation, , via :issue:`23`." msgstr "" -#: ../../changelog.rst:24 +#: ../../changelog.rst:31 msgid "0.11.1" msgstr "" -#: ../../changelog.rst:26 ../../changelog.rst:33 +#: ../../changelog.rst:33 ../../changelog.rst:40 msgid "**Released on June 4, 2024**" msgstr "" -#: ../../changelog.rst:28 +#: ../../changelog.rst:35 msgid "Remove validating ``typ`` header with ``jwt.decode`` method." msgstr "" -#: ../../changelog.rst:31 +#: ../../changelog.rst:38 msgid "0.11.0" msgstr "" -#: ../../changelog.rst:35 +#: ../../changelog.rst:42 msgid "``jwe.decrypt_json`` allows to verify only one recipient." msgstr "" -#: ../../changelog.rst:36 +#: ../../changelog.rst:43 msgid "Prevent ``OctKey`` to import ``ssh-dss``." msgstr "" -#: ../../changelog.rst:37 +#: ../../changelog.rst:44 msgid "Deprecate use of string and bytes as key." msgstr "" -#: ../../changelog.rst:40 +#: ../../changelog.rst:47 msgid "0.10.0" msgstr "" -#: ../../changelog.rst:42 +#: ../../changelog.rst:49 msgid "**Released on May 13, 2024**" msgstr "" -#: ../../changelog.rst:44 +#: ../../changelog.rst:51 msgid "Change ``jwt.encode`` and ``jwt.decode`` to use JWS by default." msgstr "" -#: ../../changelog.rst:47 +#: ../../changelog.rst:54 msgid "0.9.0" msgstr "" -#: ../../changelog.rst:49 +#: ../../changelog.rst:56 msgid "**Released on November 16, 2023**" msgstr "" -#: ../../changelog.rst:51 +#: ../../changelog.rst:58 msgid "Use ``os.urandom`` for ``OctKey.generate_key``." msgstr "" -#: ../../changelog.rst:52 +#: ../../changelog.rst:59 msgid "Add ``allow_blank`` for ``JWTClaimsRegistry``." msgstr "" -#: ../../changelog.rst:53 +#: ../../changelog.rst:60 msgid "Improve callable key for :meth:`~jwk.guess_key`." msgstr "" -#: ../../changelog.rst:56 +#: ../../changelog.rst:63 msgid "0.8.0" msgstr "" -#: ../../changelog.rst:58 +#: ../../changelog.rst:65 msgid "**Released on September 06, 2023**" msgstr "" -#: ../../changelog.rst:60 +#: ../../changelog.rst:67 msgid "Add :ref:`ensure_kid` method on key models." msgstr "" -#: ../../changelog.rst:61 +#: ../../changelog.rst:68 msgid "Add ``auto_kid`` parameter on key model ``.generate_key`` method." msgstr "" -#: ../../changelog.rst:62 ../../changelog.rst:72 +#: ../../changelog.rst:69 ../../changelog.rst:79 msgid "Improvements on type hints" msgstr "" -#: ../../changelog.rst:65 +#: ../../changelog.rst:72 msgid "0.7.0" msgstr "" -#: ../../changelog.rst:67 +#: ../../changelog.rst:74 msgid "**Released on August 14, 2023**" msgstr "" -#: ../../changelog.rst:69 +#: ../../changelog.rst:76 msgid "Add \"iat\" claims validation in JWT." msgstr "" -#: ../../changelog.rst:70 +#: ../../changelog.rst:77 msgid "Add ``__bool__`` magic method on :class:`jwk.KeySet`." msgstr "" -#: ../../changelog.rst:71 +#: ../../changelog.rst:78 msgid "" "Raise ``InvalidExchangeKeyError`` for ``exchange_derive_key`` on Curve " "key." msgstr "" -#: ../../changelog.rst:75 +#: ../../changelog.rst:82 msgid "0.6.0" msgstr "" -#: ../../changelog.rst:77 +#: ../../changelog.rst:84 msgid "**Released on July 20, 2023**" msgstr "" -#: ../../changelog.rst:79 +#: ../../changelog.rst:86 msgid "Huge improvements on type hints, via :user:`Viicos`." msgstr "" -#: ../../changelog.rst:80 +#: ../../changelog.rst:87 msgid "Do not mutate the header when ``jwt.encode``, via :issue:`6`." msgstr "" -#: ../../changelog.rst:81 +#: ../../changelog.rst:88 msgid "Register algorithms with their matched key types on key set." msgstr "" -#: ../../changelog.rst:82 +#: ../../changelog.rst:89 msgid "Improve error handling, raise proper errors." msgstr "" -#: ../../changelog.rst:84 +#: ../../changelog.rst:91 msgid "**Breaking changes**:" msgstr "" -#: ../../changelog.rst:86 +#: ../../changelog.rst:93 msgid "" "``jws.JSONSignature`` is replaced by :class:`jws.GeneralJSONSignature` " "and :class:`jws.FlattenedJSONSignature`." msgstr "" -#: ../../changelog.rst:88 +#: ../../changelog.rst:95 msgid "" "``jwe.JSONEncryption`` is replaced by :class:`jwe.GeneralJSONEncryption` " "and :class:`jwe.FlattenedJSONEncryption`." msgstr "" -#: ../../changelog.rst:92 +#: ../../changelog.rst:99 msgid "0.5.0" msgstr "" -#: ../../changelog.rst:94 +#: ../../changelog.rst:101 msgid "**Released on July 12, 2023**" msgstr "" -#: ../../changelog.rst:96 +#: ../../changelog.rst:103 msgid "Add RFC7797 JSON Web Signature (JWS) Unencoded Payload Option" msgstr "" -#: ../../changelog.rst:97 +#: ../../changelog.rst:104 msgid "Fix ``decrypt_json`` when there is no ``encrypted_key``" msgstr "" -#: ../../changelog.rst:98 +#: ../../changelog.rst:105 msgid "Rename JWE CompleteJSONSerialization to GeneralJSONSerialization" msgstr "" -#: ../../changelog.rst:99 +#: ../../changelog.rst:106 msgid "Rename ``JSONEncryption.flatten`` to ``.flattened``" msgstr "" -#: ../../changelog.rst:100 +#: ../../changelog.rst:107 msgid "Load and dump RSA, EC, and OKP key with password" msgstr "" -#: ../../changelog.rst:101 +#: ../../changelog.rst:108 msgid "" "Rename Curve key method: ``exchange_shared_key`` to " "``exchange_derive_key``" msgstr "" -#: ../../changelog.rst:104 +#: ../../changelog.rst:111 msgid "0.4.0" msgstr "" -#: ../../changelog.rst:106 +#: ../../changelog.rst:113 msgid "**Released on July 6, 2023**" msgstr "" -#: ../../changelog.rst:108 +#: ../../changelog.rst:115 msgid "Change ``options`` to ``parameters`` for JWK methods" msgstr "" -#: ../../changelog.rst:109 +#: ../../changelog.rst:116 msgid "Change ``JWSRegistry`` and ``JWERegistry`` parameters" msgstr "" -#: ../../changelog.rst:110 +#: ../../changelog.rst:117 msgid "Guess ``sender_key`` from JWKs in JWE" msgstr "" -#: ../../changelog.rst:111 +#: ../../changelog.rst:118 msgid "Add importing key from DER encoding bytes" msgstr "" -#: ../../changelog.rst:112 +#: ../../changelog.rst:119 msgid "Fix JWS JSON serialization when members have only unprotected headers" msgstr "" -#: ../../changelog.rst:113 +#: ../../changelog.rst:120 msgid "Check key type before processing algorithms of JWS and JWE" msgstr "" -#: ../../changelog.rst:116 +#: ../../changelog.rst:123 msgid "0.3.0" msgstr "" -#: ../../changelog.rst:118 +#: ../../changelog.rst:125 msgid "**Released on June 29, 2023**" msgstr "" -#: ../../changelog.rst:120 +#: ../../changelog.rst:127 msgid "Return ``str`` instead of ``bytes`` for JWS and JWE serializations" msgstr "" -#: ../../changelog.rst:121 +#: ../../changelog.rst:128 msgid "Add a ``detach_content`` method for JWS" msgstr "" -#: ../../changelog.rst:122 +#: ../../changelog.rst:129 msgid "Remove ``jwt.extract`` method, because ``extract`` won't work for JWE" msgstr "" -#: ../../changelog.rst:123 +#: ../../changelog.rst:130 msgid "Add ``JWKRegistry`` for JWK" msgstr "" -#: ../../changelog.rst:124 +#: ../../changelog.rst:131 msgid "Update ``JSONEncryption.add_recipient`` parameters" msgstr "" -#: ../../changelog.rst:125 +#: ../../changelog.rst:132 msgid "Export register methods for JWE drafts" msgstr "" -#: ../../changelog.rst:128 +#: ../../changelog.rst:135 msgid "0.2.0" msgstr "" -#: ../../changelog.rst:130 +#: ../../changelog.rst:137 msgid "**Released on June 25, 2023**" msgstr "" -#: ../../changelog.rst:132 +#: ../../changelog.rst:139 msgid "A beta release." msgstr "" -#: ../../changelog.rst:135 +#: ../../changelog.rst:142 msgid "0.1.0" msgstr "" -#: ../../changelog.rst:137 +#: ../../changelog.rst:144 msgid "**Released on March 5, 2023**" msgstr "" -#: ../../changelog.rst:139 +#: ../../changelog.rst:146 msgid "Initial release." msgstr "" diff --git a/docs/locales/zh/LC_MESSAGES/contributing.po b/docs/locales/zh/LC_MESSAGES/contributing.po index 1cf48a0..2a0cc81 100644 --- a/docs/locales/zh/LC_MESSAGES/contributing.po +++ b/docs/locales/zh/LC_MESSAGES/contributing.po @@ -6,7 +6,7 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: joserfc 0.5.0\n" +"Project-Id-Version: joserfc\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2024-06-15 13:31+0900\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" diff --git a/docs/locales/zh/LC_MESSAGES/guide.po b/docs/locales/zh/LC_MESSAGES/guide.po index 28eda23..65b0e6d 100644 --- a/docs/locales/zh/LC_MESSAGES/guide.po +++ b/docs/locales/zh/LC_MESSAGES/guide.po @@ -6,7 +6,7 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: joserfc 0.5.0\n" +"Project-Id-Version: joserfc\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2024-06-15 13:31+0900\n" "PO-Revision-Date: 2023-07-15 14:44+0900\n" @@ -550,8 +550,9 @@ msgid "" "provide more focused and specialized libraries." msgstr "" "``joserfc`` 分离自 Authlib,以便于简化维护和模块化。之前,Authlib " -"是作为一个单体库开发的,旨在设计一个涵盖广泛身份验证和安全需求的全面 API。然而,随着项目的发展,我们发现是时候将模块从 Authlib " -"中拆分出来了,这将有助于提高项目的可维护性,并提供更专注和专业化的 JOSE 库。" +"是作为一个单体库开发的,旨在设计一个涵盖广泛身份验证和安全需求的全面 API。然而," +"随着项目的发展,我们发现是时候将模块从 Authlib 中拆分出来了,这将有助于提高项目的可维护性," +"并提供更专注和专业化的 JOSE 库。" #: ../../guide/introduction.rst:37 msgid "" @@ -563,6 +564,9 @@ msgid "" "knowing that they are working with a dedicated and well-maintained " "solution." msgstr "" +"``joserfc`` 是一个专门用于JOSE标准的 Python 库,方便开发人员处理 JOSE 相关事务。" +"这次改进不仅有助于更好地组织代码和文档,还能提供更流畅的开发体验。开发人员可以放心地使用" +"``joserfc``将JOSE功能无缝集成到他们的项目中,确保他们正在使用一个专注并且维护良好的解决方案。" #: ../../guide/jwe.rst:11 msgid "" @@ -611,6 +615,8 @@ msgid "" "correct key type according to :ref:`JSON Web Encryption Algorithms " "`." msgstr "" +"建议您学习 :ref:`jwk` 部分,并根据 :ref:`JSON Web Encryption Algorithms ` " +"找到正确的密钥类型。" #: ../../guide/jwe.rst:69 ../../guide/jwe.rst:158 msgid "Decryption" diff --git a/docs/locales/zh/LC_MESSAGES/index.po b/docs/locales/zh/LC_MESSAGES/index.po index 9360b65..0c5f918 100644 --- a/docs/locales/zh/LC_MESSAGES/index.po +++ b/docs/locales/zh/LC_MESSAGES/index.po @@ -6,7 +6,7 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: joserfc 0.5.0\n" +"Project-Id-Version: joserfc\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2024-06-15 13:31+0900\n" "PO-Revision-Date: 2023-07-15 14:44+0900\n" diff --git a/docs/locales/zh/LC_MESSAGES/install.po b/docs/locales/zh/LC_MESSAGES/install.po index eaf6c6d..a42d0a5 100644 --- a/docs/locales/zh/LC_MESSAGES/install.po +++ b/docs/locales/zh/LC_MESSAGES/install.po @@ -6,7 +6,7 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: joserfc 0.5.0\n" +"Project-Id-Version: joserfc\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2023-07-20 21:07+0900\n" "PO-Revision-Date: 2023-07-15 14:44+0900\n" diff --git a/docs/locales/zh/LC_MESSAGES/migrations.po b/docs/locales/zh/LC_MESSAGES/migrations.po index b514a9a..b0a71dc 100644 --- a/docs/locales/zh/LC_MESSAGES/migrations.po +++ b/docs/locales/zh/LC_MESSAGES/migrations.po @@ -6,7 +6,7 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: joserfc 0.5.0\n" +"Project-Id-Version: joserfc\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2024-06-15 13:31+0900\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" diff --git a/docs/locales/zh/LC_MESSAGES/recipes.po b/docs/locales/zh/LC_MESSAGES/recipes.po index d10422a..5306e03 100644 --- a/docs/locales/zh/LC_MESSAGES/recipes.po +++ b/docs/locales/zh/LC_MESSAGES/recipes.po @@ -6,7 +6,7 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: joserfc 0.5.0\n" +"Project-Id-Version: joserfc\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2024-06-15 13:31+0900\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" diff --git a/docs/locales/zh/LC_MESSAGES/security.po b/docs/locales/zh/LC_MESSAGES/security.po index 924868a..d4e83b9 100644 --- a/docs/locales/zh/LC_MESSAGES/security.po +++ b/docs/locales/zh/LC_MESSAGES/security.po @@ -6,7 +6,7 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: joserfc 0.5.0\n" +"Project-Id-Version: joserfc\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2023-07-15 14:44+0900\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" diff --git a/docs/locales/zh/LC_MESSAGES/stability.po b/docs/locales/zh/LC_MESSAGES/stability.po index 5dd8a10..ba1d23c 100644 --- a/docs/locales/zh/LC_MESSAGES/stability.po +++ b/docs/locales/zh/LC_MESSAGES/stability.po @@ -6,7 +6,7 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: joserfc 0.5.0\n" +"Project-Id-Version: joserfc\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2023-07-15 14:44+0900\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" diff --git a/src/joserfc/__init__.py b/src/joserfc/__init__.py index cc113ca..db0ddb1 100644 --- a/src/joserfc/__init__.py +++ b/src/joserfc/__init__.py @@ -1,4 +1,4 @@ -__version__ = "0.12.0" +__version__ = "1.0.0" __homepage__ = "https://jose.authlib.org/en/" __author__ = "Hsiaoming Yang " __license__ = "BSD-3-Clause"