webex_byova.jws
webex_byova.jws
JWS token verification.
__all__
module-attribute
__all__ = ['JWSVerifier']
JWSVerifier
Fetch Webex JWKs and verify inbound BYODS JWS tokens.
__init__
__init__(config: BYOVAConfig | None = None) -> None
Initialize the JWS verifier.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config
|
BYOVAConfig | None
|
SDK configuration for JWK URL and timeout; uses defaults if omitted. |
None
|
verify
verify(jws_token: str) -> dict[str, Any]
Verify a JWS token and return decoded claims.
Fetches JWKs from the configured region endpoint and validates the RS256 signature.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
jws_token
|
str
|
JWS token string from Webex data delivery. |
required |
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
Decoded JWT claims dictionary. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the token is malformed or no matching JWK is found. |
averify
async
averify(jws_token: str) -> dict[str, Any]
Verify a JWS token asynchronously.
Currently delegates to the sync implementation (JWK fetch is sync).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
jws_token
|
str
|
JWS token string from Webex data delivery. |
required |
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
Decoded JWT claims dictionary. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the token is malformed or no matching JWK is found. |
webex_byova.jws.verifier.JWSVerifier
Fetch Webex JWKs and verify inbound BYODS JWS tokens.
_config
instance-attribute
_config = config or BYOVAConfig()
_jwks_cache
instance-attribute
_jwks_cache: dict[str, Any] | None = None
__init__
__init__(config: BYOVAConfig | None = None) -> None
Initialize the JWS verifier.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config
|
BYOVAConfig | None
|
SDK configuration for JWK URL and timeout; uses defaults if omitted. |
None
|
_fetch_jwks
_fetch_jwks() -> dict[str, Any]
verify
verify(jws_token: str) -> dict[str, Any]
Verify a JWS token and return decoded claims.
Fetches JWKs from the configured region endpoint and validates the RS256 signature.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
jws_token
|
str
|
JWS token string from Webex data delivery. |
required |
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
Decoded JWT claims dictionary. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the token is malformed or no matching JWK is found. |
averify
async
averify(jws_token: str) -> dict[str, Any]
Verify a JWS token asynchronously.
Currently delegates to the sync implementation (JWK fetch is sync).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
jws_token
|
str
|
JWS token string from Webex data delivery. |
required |
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
Decoded JWT claims dictionary. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the token is malformed or no matching JWK is found. |