-
Notifications
You must be signed in to change notification settings - Fork 327
Description
Currently, the Python Keycloak library lacks functionality to retrieve events configuration. I've implemented a solution for this and would like to contribute it.
Implemented Solution:
Purpose:
This method retrieves the current events configuration, which is essential when:
You need to check available configuration options
You want to modify specific event settings before applying them with set_events
You need to maintain existing configurations while updating specific values
The implementation follows the library's existing patterns and provides consistent error handling. I believe this would be a valuable addition to the library's admin event management capabilities.
Would you be open to incorporating this functionality? I'm happy to submit a PR with tests and documentation if this aligns with the project's direction.
def get_events_config(self): """Get events configuration. :type realm_name: str :return: Http response :rtype: bytes """ params_path = {"realm-name": self.connection.realm_name} data_raw = self.connection.raw_get( urls_patterns.URL_ADMIN_EVENTS_CONFIG.format(**params_path) ) return raise_error_from_response( data_raw, KeycloakGetError, expected_codes=[200] )
