Skip to content

sso

sso

get_sso_oidc_config async

get_sso_oidc_config(
    auth: DomoAuth,
    *,
    context: RouteContext | None = None,
    **context_kwargs
)

Open ID Connect framework

Source code in src/crew_dcs/routes/instance_config/sso.py
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(
        entity_extractor=DomoEntityExtractor(),
        result_processor=DomoEntityResultProcessor(),
    ),
)
async def get_sso_oidc_config(
    auth: dmda.DomoAuth,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
):
    """Open ID Connect framework"""

    url = f"https://{auth.domo_instance}.domo.com/api/identity/v1/authentication/oidc/std/settings"

    res = await gd.get_data(
        auth=auth,
        url=url,
        method="GET",
        context=context,
    )

    if not res.is_success:
        raise SSO_GET_Error(res=res)

    return res

get_sso_saml_config async

get_sso_saml_config(
    auth: DomoAuth,
    *,
    context: RouteContext | None = None,
    **context_kwargs
)

Security Assertion Markup Language

Source code in src/crew_dcs/routes/instance_config/sso.py
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(
        entity_extractor=DomoEntityExtractor(),
        result_processor=DomoEntityResultProcessor(),
    ),
)
async def get_sso_saml_config(
    auth: dmda.DomoAuth,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
):
    """Security Assertion Markup Language"""

    url = f"https://{auth.domo_instance}.domo.com/api/identity/v1/authentication/saml/std/settings"

    res = await gd.get_data(
        auth=auth,
        url=url,
        method="GET",
        context=context,
    )

    if not res.is_success:
        raise SSO_GET_Error(res=res)

    return res

toggle_sso_custom_attributes async

toggle_sso_custom_attributes(
    auth: DomoAuth,
    is_custom_attributes: bool,
    *,
    context: RouteContext | None = None,
    **context_kwargs
)

unsure what this API does

Source code in src/crew_dcs/routes/instance_config/sso.py
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(result_processor=ResponseGetDataProcessor()),
)
async def toggle_sso_custom_attributes(
    auth: dmda.DomoAuth,
    is_custom_attributes: bool,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
):
    """unsure what this API does"""

    url = f"https://{auth.domo_instance}.domo.com/api/customer/v1/properties/authentication.saml.custom_attributes"

    res = await gd.get_data(
        auth=auth,
        url=url,
        method="PUT",
        body={"value": is_custom_attributes},
        context=context,
    )

    if not res.is_success:
        raise SSO_CRUD_Error(res=res)

    res.response = f"toggled is_custom_attributes - {is_custom_attributes!s}"

    return res

update_sso_oidc_config async

update_sso_oidc_config(
    auth: DomoAuth,
    body_sso: dict,
    *,
    context: RouteContext | None = None,
    **context_kwargs
)

to update saml config must update temp and then standard typically would hide under class functions, but b/c Domo won't update w/o it, pushing down to Route

Source code in src/crew_dcs/routes/instance_config/sso.py
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(result_processor=ResponseGetDataProcessor()),
)
async def update_sso_oidc_config(
    auth: dmda.DomoAuth,
    body_sso: dict,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
):
    """
    to update saml config must update temp and then standard
    typically would hide under class functions, but b/c Domo won't update w/o it, pushing down to Route
    """
    context = RouteContext.build_context(context=context, **context_kwargs)

    await _update_sso_oidc_temp_config(
        auth=auth,
        body_sso=body_sso,
        context=context,
    )

    return await _update_sso_oidc_standard_config(
        auth=auth,
        body_sso=body_sso,
        context=context,
    )

update_sso_saml_config async

update_sso_saml_config(
    auth: DomoAuth,
    body_sso: dict,
    *,
    context: RouteContext | None = None,
    **context_kwargs
)

to update saml config must update temp and then standard typically would hide under class functions, but b/c Domo won't update w/o it, pushing down to Route

Source code in src/crew_dcs/routes/instance_config/sso.py
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(result_processor=ResponseGetDataProcessor()),
)
async def update_sso_saml_config(
    auth: dmda.DomoAuth,
    body_sso: dict,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
):
    """
    to update saml config must update temp and then standard
    typically would hide under class functions, but b/c Domo won't update w/o it, pushing down to Route
    """
    context = RouteContext.build_context(context=context, **context_kwargs)

    context = RouteContext.build_context(context=context, **context_kwargs)

    await _update_sso_saml_temp_config(
        auth=auth,
        body_sso=body_sso,
        context=context,
    )

    return await _update_sso_saml_standard_config(
        auth=auth,
        body_sso=body_sso,
        context=context,
    )