File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -79,6 +79,7 @@ IANANamedInformationHashAlgorithmRegistry: dict[
79
79
| hashes .BLAKE2b
80
80
| None ,
81
81
]
82
+ JWKKeyTypeSupported = Literal ["oct" , "RSA" , "EC" , "OKP" ]
82
83
83
84
class InvalidJWKType (JWException ):
84
85
value : str | None
@@ -98,9 +99,12 @@ class InvalidJWKValue(JWException): ...
98
99
99
100
class JWK (dict [str , Any ]):
100
101
def __init__ (self , ** kwargs ) -> None : ...
102
+ # `kty` and the other keyword arguments are passed as `params` to the called generator
103
+ # function. The possible arguments depend on the value of `kty`.
104
+ # TODO: Add overloads for the individual `kty` values.
101
105
@classmethod
102
- def generate (cls , ** kwargs : Any ) -> Self : ...
103
- def generate_key (self , ** params ) -> None : ...
106
+ def generate (cls , kty : JWKKeyTypeSupported , ** kwargs ) -> Self : ...
107
+ def generate_key (self , kty : JWKKeyTypeSupported , ** kwargs ) -> None : ...
104
108
def import_key (self , ** kwargs ) -> None : ...
105
109
@classmethod
106
110
def from_json (cls , key ) -> Self : ...
You can’t perform that action at this time.
0 commit comments