mirror of
https://github.com/ansible-middleware/keycloak.git
synced 2026-11-22 15:10:38 +00:00
keycloak_userprofile: support required.scopes
Keycloak can require a user profile attribute only when one of the given client scopes is requested, but the module's argument spec only accepted required.roles and rejected required.scopes.
This commit is contained in:
@@ -257,6 +257,13 @@ options:
|
||||
default:
|
||||
- user
|
||||
|
||||
scopes:
|
||||
description:
|
||||
- The client scopes for which this attribute is required.
|
||||
- If not set, the attribute is required regardless of the requested scopes.
|
||||
type: list
|
||||
elements: str
|
||||
|
||||
selector:
|
||||
description:
|
||||
- Selector when the attribute should be added.
|
||||
@@ -583,7 +590,11 @@ def main():
|
||||
),
|
||||
"multivalued": dict(type="bool", default=False),
|
||||
"required": dict(
|
||||
type="dict", options={"roles": dict(type="list", elements="str", default=["user"])}
|
||||
type="dict",
|
||||
options={
|
||||
"roles": dict(type="list", elements="str", default=["user"]),
|
||||
"scopes": dict(type="list", elements="str"),
|
||||
},
|
||||
),
|
||||
"selector": dict(type="dict", options={"scopes": dict(type="list", elements="str")}),
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user