simple_openid_connect.utils¶
Internal utilities
Functions
|
Whether the given content type is application/json. |
|
Validate that the given condition is true, raising a ValidationError with the given message if it is not. |
- simple_openid_connect.utils.is_application_json(content_type: str) bool [source]¶
Whether the given content type is application/json. This is needed because mime types can contain additional options which are ignored here.
- simple_openid_connect.utils.validate_that(condition: bool, msg: str) None [source]¶
Validate that the given condition is true, raising a ValidationError with the given message if it is not.
This is implemented to write concise validating assertions.
- Raises:
ValidationError – if the condition is false