feat: add authorization_flow to import script
This commit is contained in:
parent
3d8f08efda
commit
d23e5ca30d
|
@ -139,13 +139,17 @@ class Command(BaseCommand):
|
|||
"identifier_policy", OIDCClient.POLICY_UUID
|
||||
)
|
||||
assert isinstance(identifier_policy, int)
|
||||
authorization_flow = service.get(
|
||||
"authorization_flow", OIDCClient.FLOW_AUTHORIZATION_CODE
|
||||
)
|
||||
assert isinstance(authorization_flow, int)
|
||||
|
||||
idtoken_algo = OIDCClient.ALGO_HMAC
|
||||
if "idtoken_algo" in service:
|
||||
idtoken_algo = getattr(
|
||||
OIDCClient, "ALGO_" + service["idtoken_algo"].upper()
|
||||
)
|
||||
scope = service.get("scope", "")
|
||||
|
||||
oidc_client, created = OIDCClient.objects.get_or_create(
|
||||
slug=service["slug"],
|
||||
ou=ou,
|
||||
|
@ -160,6 +164,7 @@ class Command(BaseCommand):
|
|||
"redirect_uris": "\n".join(redirect_uris),
|
||||
"has_api_access": has_api_access,
|
||||
"identifier_policy": identifier_policy,
|
||||
"authorization_flow": authorization_flow,
|
||||
"idtoken_algo": idtoken_algo,
|
||||
"scope": scope,
|
||||
},
|
||||
|
@ -177,6 +182,7 @@ class Command(BaseCommand):
|
|||
"has_api_access",
|
||||
"idtoken_algo",
|
||||
"identifier_policy",
|
||||
"authorization_flow",
|
||||
"scope",
|
||||
):
|
||||
value = locals()[key]
|
||||
|
|
Loading…
Reference in New Issue