mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-29 03:30:22 -07:00
[PR #9987/a8b97732 backport][stable-10] Fix Keycloak authentication flow configuration issues (#10018)
Fix Keycloak authentication flow configuration issues (#9987)
* Add delete_authentication_config method and integrate it into create_or_update_executions
* typo
* Sanity
* Add integration tests for keycloak_authentication module with README, tasks, and variables
* Add copyright and license information to access_token.yml
* Sanity
* Refactor Keycloak integration tests: streamline README, update access token task, and enhance variable management
* Maj changelogs fragments
---------
Co-authored-by: Andre Desrosiers <andre.desrosiers@ssss.gouv.qc.ca>
(cherry picked from commit a8b977320c
)
Co-authored-by: desand01 <desrosiers.a@hotmail.com>
This commit is contained in:
parent
138740127a
commit
1c1d58482c
8 changed files with 262 additions and 0 deletions
|
@ -2224,6 +2224,23 @@ class KeycloakAPI(object):
|
|||
except Exception as e:
|
||||
self.fail_request(e, msg="Unable to add authenticationConfig %s: %s" % (executionId, str(e)))
|
||||
|
||||
def delete_authentication_config(self, configId, realm='master'):
|
||||
""" Delete authenticator config
|
||||
|
||||
:param configId: id of authentication config
|
||||
:param realm: realm of authentication config to be deleted
|
||||
"""
|
||||
try:
|
||||
# Send a DELETE request to remove the specified authentication config from the Keycloak server.
|
||||
self._request(
|
||||
URL_AUTHENTICATION_CONFIG.format(
|
||||
url=self.baseurl,
|
||||
realm=realm,
|
||||
id=configId),
|
||||
method='DELETE')
|
||||
except Exception as e:
|
||||
self.fail_request(e, msg="Unable to delete authentication config %s: %s" % (configId, str(e)))
|
||||
|
||||
def create_subflow(self, subflowName, flowAlias, realm='master', flowType='basic-flow'):
|
||||
""" Create new sublow on the flow
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue