woob.tools.pkce
¶
Utilities for handling PKCE (RFC 7636).
- class PKCEChallengeType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
-
PKCE challenge type.
- PLAIN = 'PLAIN'¶
Plaintext challenge.
- S256 = 'S256'¶
SHA-256 challenge.
- class PKCEData(verifier: str, challenge: str, method: str)[source]¶
Bases:
NamedTuple
PKCE data to generate.
- classmethod build(type_=PKCEChallengeType.S256)[source]¶
Build random data for OAuth2 PKCE extension.
- Parameters:
type_ (
PKCEChallengeType
) – The type of challenge to produce. (default:PKCEChallengeType.S256
)- Return type:
- Returns:
The PKCE data.