Skip to content

Commit

Permalink
v0.4.1 (#3)
Browse files Browse the repository at this point in the history
* add `Jwk.timestamp()` and `Jwt.timestamp_to_datetime()` classmethods to handle timestamps easily
* added missing JwsJsonFlat and JwsJsonGeneral root level exports. sorted __all__ alphabetically
  • Loading branch information
guillp authored Oct 7, 2022
1 parent be9ac80 commit 51d24ea
Show file tree
Hide file tree
Showing 16 changed files with 307 additions and 245 deletions.
92 changes: 47 additions & 45 deletions jwskate/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
UnsupportedEllipticCurve,
UnsupportedOKPCurve,
)
from .jws import InvalidJws, JwsCompact
from .jws import InvalidJws, JwsCompact, JwsJsonFlat, JwsJsonGeneral
from .jwt import (
ExpiredJwt,
InvalidClaim,
Expand All @@ -102,39 +102,18 @@
)

__all__ = [
"EncryptionAlgs",
"KeyManagementAlgs",
"SignatureAlgs",
"A128CBC_HS256",
"A128GCM",
"A128GCMKW",
"A128KW",
"A192CBC_HS384",
"A192GCM",
"A192GCMKW",
"A192KW",
"A256CBC_HS512",
"A256GCM",
"A256GCMKW",
"A256KW",
"ES256",
"ES256K",
"ES384",
"ES512",
"HS256",
"HS384",
"HS512",
"P_256",
"P_384",
"P_521",
"PS256",
"PS384",
"PS512",
"RS256",
"RS384",
"RS512",
"X448",
"X25519",
"A128CBC_HS256",
"A192CBC_HS384",
"A256CBC_HS512",
"BaseAESEncryptionAlg",
"BaseAlg",
"BaseAsymmetricAlg",
Expand All @@ -145,47 +124,70 @@
"BaseSignatureAlg",
"BaseSymmetricAlg",
"DirectKeyUse",
"ECJwk",
"ES256",
"ES256K",
"ES384",
"ES512",
"EcdhEs",
"EcdhEs_A128KW",
"EcdhEs_A192KW",
"EcdhEs_A256KW",
"Ed448",
"Ed25519",
"Ed448",
"EdDsa",
"EllipticCurve",
"EncryptionAlgs",
"ExpectedAlgRequired",
"ExpiredJwt",
"HS256",
"HS384",
"HS512",
"InvalidClaim",
"InvalidJwe",
"InvalidJwk",
"InvalidJws",
"InvalidJwt",
"InvalidSignature",
"JweCompact",
"Jwk",
"JwkSet",
"JwsCompact",
"JwsJsonFlat",
"JwsJsonGeneral",
"Jwt",
"JwtSigner",
"KeyManagementAlgs",
"MismatchingAuthTag",
"OKPCurve",
"OKPJwk",
"PS256",
"PS384",
"PS512",
"P_256",
"P_384",
"P_521",
"Pbes2_HS256_A128KW",
"Pbes2_HS384_A192KW",
"Pbes2_HS512_A256KW",
"PrivateKeyRequired",
"PublicKeyRequired",
"RS256",
"RS384",
"RS512",
"RSAJwk",
"RsaEsOaep",
"RsaEsOaepSha256",
"RsaEsOaepSha384",
"RsaEsOaepSha512",
"RsaEsPcks1v1_5",
"secp256k1",
"InvalidJwe",
"JweCompact",
"ECJwk",
"ExpectedAlgRequired",
"InvalidJwk",
"Jwk",
"JwkSet",
"OKPJwk",
"RSAJwk",
"SignatureAlgs",
"SignedJwt",
"SymmetricJwk",
"UnsupportedAlg",
"UnsupportedEllipticCurve",
"UnsupportedOKPCurve",
"InvalidJws",
"JwsCompact",
"ExpiredJwt",
"InvalidClaim",
"InvalidJwt",
"InvalidSignature",
"Jwt",
"JwtSigner",
"SignedJwt",
"X25519",
"X448",
"secp256k1",
]
84 changes: 42 additions & 42 deletions jwskate/jwa/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,67 +72,67 @@
)

__all__ = [
"BaseAlg",
"BaseAsymmetricAlg",
"BaseSymmetricAlg",
"BaseAESEncryptionAlg",
"BaseKeyManagementAlg",
"BaseSignatureAlg",
"P_256",
"P_384",
"P_521",
"EllipticCurve",
"secp256k1",
"A128CBC_HS256",
"A192CBC_HS384",
"A256CBC_HS512",
"A128GCM",
"A128GCMKW",
"A128KW",
"A192CBC_HS384",
"A192GCM",
"A192GCMKW",
"A192KW",
"A256CBC_HS512",
"A256GCM",
"A256GCMKW",
"A256KW",
"BaseAESEncryptionAlg",
"BaseAesGcmKeyWrap",
"A128GCM",
"A192GCM",
"A256GCM",
"BaseAesKeyWrap",
"A128KW",
"A192KW",
"A256KW",
"BaseAlg",
"BaseAsymmetricAlg",
"BaseEcdhEs_AesKw",
"BaseKeyManagementAlg",
"BasePbes2",
"BaseRsaKeyWrap",
"BaseSignatureAlg",
"BaseSymmetricAlg",
"DirectKeyUse",
"ES256",
"ES256K",
"ES384",
"ES512",
"EcdhEs",
"BaseEcdhEs_AesKw",
"EcdhEs_A128KW",
"EcdhEs_A192KW",
"EcdhEs_A256KW",
"BasePbes2",
"Pbes2_HS256_A128KW",
"Pbes2_HS384_A192KW",
"Pbes2_HS512_A256KW",
"BaseRsaKeyWrap",
"RsaEsOaep",
"RsaEsOaepSha256",
"RsaEsOaepSha384",
"RsaEsOaepSha512",
"RsaEsPcks1v1_5",
"Ed25519",
"Ed448",
"EdDsa",
"EllipticCurve",
"HS256",
"HS384",
"HS512",
"EdDsa",
"ES256",
"ES256K",
"ES384",
"ES512",
"MismatchingAuthTag",
"OKPCurve",
"PS256",
"PS384",
"PS512",
"P_256",
"P_384",
"P_521",
"Pbes2_HS256_A128KW",
"Pbes2_HS384_A192KW",
"Pbes2_HS512_A256KW",
"PrivateKeyRequired",
"PublicKeyRequired",
"RS256",
"RS384",
"RS512",
"OKPCurve",
"Ed25519",
"Ed448",
"X448",
"RsaEsOaep",
"RsaEsOaepSha256",
"RsaEsOaepSha384",
"RsaEsOaepSha512",
"RsaEsPcks1v1_5",
"X25519",
"PrivateKeyRequired",
"PublicKeyRequired",
"MismatchingAuthTag",
"X448",
"secp256k1",
]
4 changes: 2 additions & 2 deletions jwskate/jwa/encryption/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@

__all__ = [
"A128CBC_HS256",
"A192CBC_HS384",
"A256CBC_HS512",
"A128GCM",
"A192CBC_HS384",
"A192GCM",
"A256CBC_HS512",
"A256GCM",
]
12 changes: 6 additions & 6 deletions jwskate/jwa/key_mgmt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,24 @@

__all__ = [
"A128GCMKW",
"A192GCMKW",
"A256GCMKW",
"BaseAesGcmKeyWrap",
"A128KW",
"A192GCMKW",
"A192KW",
"A256GCMKW",
"A256KW",
"BaseAesGcmKeyWrap",
"BaseAesKeyWrap",
"BaseEcdhEs_AesKw",
"BasePbes2",
"BaseRsaKeyWrap",
"DirectKeyUse",
"EcdhEs",
"BaseEcdhEs_AesKw",
"EcdhEs_A128KW",
"EcdhEs_A192KW",
"EcdhEs_A256KW",
"BasePbes2",
"Pbes2_HS256_A128KW",
"Pbes2_HS384_A192KW",
"Pbes2_HS512_A256KW",
"BaseRsaKeyWrap",
"RsaEsOaep",
"RsaEsOaepSha256",
"RsaEsOaepSha384",
Expand Down
6 changes: 3 additions & 3 deletions jwskate/jwa/signature/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
from .rsa import PS256, PS384, PS512, RS256, RS384, RS512

__all__ = [
"HS256",
"HS384",
"HS512",
"ES256",
"ES256K",
"ES384",
"ES512",
"EdDsa",
"HS256",
"HS384",
"HS512",
"PS256",
"PS384",
"PS512",
Expand Down
2 changes: 1 addition & 1 deletion jwskate/jwe/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@

from .compact import InvalidJwe, JweCompact

__all__ = ["JweCompact", "InvalidJwe"]
__all__ = ["InvalidJwe", "JweCompact"]
10 changes: 5 additions & 5 deletions jwskate/jwk/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
from .rsa import RSAJwk

__all__ = [
"ECJwk",
"ExpectedAlgRequired",
"UnsupportedAlg",
"InvalidJwk",
"Jwk",
"ECJwk",
"UnsupportedEllipticCurve",
"JwkSet",
"SymmetricJwk",
"OKPJwk",
"UnsupportedOKPCurve",
"RSAJwk",
"SymmetricJwk",
"UnsupportedAlg",
"UnsupportedEllipticCurve",
"UnsupportedOKPCurve",
]
3 changes: 2 additions & 1 deletion jwskate/jws/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""This module implements JWS token handling."""

from .compact import InvalidJws, JwsCompact
from .json import JwsJsonFlat, JwsJsonGeneral

__all__ = ["JwsCompact", "InvalidJws"]
__all__ = ["InvalidJws", "JwsCompact", "JwsJsonFlat", "JwsJsonGeneral"]
6 changes: 3 additions & 3 deletions jwskate/jwt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
from .signer import JwtSigner

__all__ = [
"Jwt",
"InvalidJwt",
"ExpiredJwt",
"InvalidClaim",
"InvalidJwt",
"InvalidSignature",
"SignedJwt",
"Jwt",
"JwtSigner",
"SignedJwt",
]
Loading

0 comments on commit 51d24ea

Please sign in to comment.