mirror of
https://github.com/ansible-middleware/keycloak.git
synced 2026-07-25 00:44:48 +00:00
AMW-571 keycloak_identity_provider hide_on_login_page not working
This commit is contained in:
@@ -115,6 +115,15 @@ options:
|
||||
- authenticateByDefault
|
||||
type: bool
|
||||
|
||||
hide_on_login:
|
||||
description:
|
||||
- If hidden, login with this provider is possible only if requested explicitly, for example using the C(kc_idp_hint)
|
||||
parameter.
|
||||
aliases:
|
||||
- hideOnLogin
|
||||
- hide_on_login_page
|
||||
type: bool
|
||||
|
||||
provider_id:
|
||||
description:
|
||||
- Protocol used by this provider (supported values are V(oidc) or V(saml)).
|
||||
@@ -129,14 +138,6 @@ options:
|
||||
identity provider configuration through check-mode in the RV(existing) field.
|
||||
type: dict
|
||||
suboptions:
|
||||
hide_on_login_page:
|
||||
description:
|
||||
- If hidden, login with this provider is possible only if requested explicitly, for example using the C(kc_idp_hint)
|
||||
parameter.
|
||||
aliases:
|
||||
- hideOnLoginPage
|
||||
type: bool
|
||||
|
||||
gui_order:
|
||||
description:
|
||||
- Number defining order of the provider in GUI (for example, on Login page).
|
||||
@@ -569,6 +570,7 @@ def main():
|
||||
alias=dict(type="str", required=True),
|
||||
add_read_token_role_on_create=dict(type="bool", aliases=["addReadTokenRoleOnCreate"]),
|
||||
authenticate_by_default=dict(type="bool", aliases=["authenticateByDefault"]),
|
||||
hide_on_login=dict(type="bool", aliases=["hideOnLogin", "hide_on_login_page"]),
|
||||
config=dict(type="dict"),
|
||||
display_name=dict(type="str", aliases=["displayName"]),
|
||||
enabled=dict(type="bool"),
|
||||
@@ -608,6 +610,20 @@ def main():
|
||||
state = module.params.get("state")
|
||||
config = module.params.get("config")
|
||||
|
||||
if config is not None:
|
||||
for legacy_key in ("hide_on_login_page", "hideOnLoginPage"):
|
||||
if legacy_key in config:
|
||||
module.deprecate(
|
||||
f"Passing '{legacy_key}' inside 'config' is deprecated. "
|
||||
"Use the top-level 'hide_on_login' parameter instead.",
|
||||
version="4.0.0",
|
||||
collection_name="middleware_automation.keycloak",
|
||||
)
|
||||
if module.params.get("hide_on_login") is None:
|
||||
module.params["hide_on_login"] = config.pop(legacy_key)
|
||||
else:
|
||||
config.pop(legacy_key)
|
||||
|
||||
fetch_identity_provider_wellknown_config(kc, config)
|
||||
|
||||
# Filter and map the parameters names that apply to the identity provider.
|
||||
|
||||
Reference in New Issue
Block a user