SSO module¶
Reference to the cloud.sso.py module.
sso
¶
Single Sign-On (SSO) functionality for the Nextmv Cloud API.
This module provides classes and methods to manage Single Sign-On (SSO) configurations for Nextmv Cloud organizations (accounts).
| CLASS | DESCRIPTION |
|---|---|
SSOConfiguration |
Represents the SSO configuration for a Nextmv Cloud organization (account) and provides methods to create, retrieve, update, enable, disable, and delete SSO configurations. |
SSOConfiguration
¶
Bases: BaseModel
Configuration for Single Sign-On (SSO) in Nextmv Cloud.
You can import the SSOConfiguration class directly from cloud:
| ATTRIBUTE | DESCRIPTION |
|---|---|
allow_non_domain_users |
Whether to allow users who are not part of the SSO domain to access the
Nextmv Cloud organization (account). Default is
TYPE:
|
enabled |
Whether SSO is enabled for the Nextmv Cloud organization (account).
TYPE:
|
metadata_url |
The URL to the SSO metadata document.
TYPE:
|
metadata_document |
The SSO metadata document as a string.
TYPE:
|
mapped_domains |
A list of mapped domains in the SSO configuration. This is read only, mapped domains are added through an explicit command. |
client |
Client to use for interacting with the Nextmv Cloud API. This is an SDK-specific attribute and it is not part of the API representation of an SSO configuration.
TYPE:
|
sso_endpoint |
Base endpoint for SSO operations. This is an SDK-specific attribute and it is not part of the API representation of an SSO configuration.
TYPE:
|
allow_non_domain_users
class-attribute
instance-attribute
¶
allow_non_domain_users: bool = False
Whether to allow users who are not part of the SSO domain to access the Nextmv Cloud organization (account).
enabled
class-attribute
instance-attribute
¶
enabled: bool | None = None
Whether SSO is enabled for the Nextmv Cloud organization (account).
metadata_url
class-attribute
instance-attribute
¶
metadata_url: str | None = None
The URL to the SSO metadata document.
metadata_document
class-attribute
instance-attribute
¶
metadata_document: str | None = None
The SSO metadata document as a string.
mapped_domains
class-attribute
instance-attribute
¶
A list of mapped domains in the SSO configuration. Mapped domains redirect additional domains to your IDP for federated authentication.
client
class-attribute
instance-attribute
¶
Client to use for interacting with the Nextmv Cloud API.
sso_endpoint
class-attribute
instance-attribute
¶
sso_endpoint: str = Field(
exclude=True, default="v1/enterprise/sso"
)
get
classmethod
¶
get(client: Client) -> SSOConfiguration
Retrieve the SSO configuration for the current Nextmv Cloud organization (account).
| PARAMETER | DESCRIPTION |
|---|---|
|
Client to use for interacting with the Nextmv Cloud API.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
SSOConfiguration
|
The SSO configuration for the organization (account). |
| RAISES | DESCRIPTION |
|---|---|
HTTPError
|
If the response status code is not 2xx. |
Source code in nextmv-py/nextmv/nextmv/cloud/sso.py
new
classmethod
¶
new(
client: Client,
allow_non_domain_users: bool = False,
enabled: bool | None = None,
metadata_url: str | None = None,
metadata_document: str | None = None,
) -> None
Create a new SSO configuration for the current Nextmv Cloud organization (account).
This method does not return the created configuration. To retrieve
the configuration after creation, use the get method.
| PARAMETER | DESCRIPTION |
|---|---|
|
Client to use for interacting with the Nextmv Cloud API.
TYPE:
|
|
Whether to allow users who are not part of the SSO domain to access
the Nextmv Cloud organization (account). Default is
TYPE:
|
|
Whether SSO is enabled for the Nextmv Cloud organization (account).
TYPE:
|
|
The URL to the SSO metadata document.
TYPE:
|
|
The SSO metadata document as a string.
TYPE:
|
| RAISES | DESCRIPTION |
|---|---|
HTTPError
|
If the response status code is not 2xx. |
Source code in nextmv-py/nextmv/nextmv/cloud/sso.py
delete
¶
Delete the SSO configuration for the current Nextmv Cloud organization (account).
| RAISES | DESCRIPTION |
|---|---|
HTTPError
|
If the response status code is not 2xx. |
Source code in nextmv-py/nextmv/nextmv/cloud/sso.py
delete_domain
¶
delete_domain(domain: str) -> None
Deletes a domain from an existing SSO configuration for the current Nextmv Cloud organization (account).
| RAISES | DESCRIPTION |
|---|---|
HTTPError
|
If the response status code is not 2xx. |
Source code in nextmv-py/nextmv/nextmv/cloud/sso.py
disable
¶
Disable SSO for the current Nextmv Cloud organization (account).
| RAISES | DESCRIPTION |
|---|---|
HTTPError
|
If the response status code is not 2xx. |
Source code in nextmv-py/nextmv/nextmv/cloud/sso.py
enable
¶
Enable SSO for the current Nextmv Cloud organization (account).
| RAISES | DESCRIPTION |
|---|---|
HTTPError
|
If the response status code is not 2xx. |
Source code in nextmv-py/nextmv/nextmv/cloud/sso.py
update
¶
update(
metadata_url: str | None = None,
metadata_document: str | None = None,
) -> None
Update the SSO configuration for the current Nextmv Cloud organization (account).
This method does not return the updated configuration. To retrieve the
configuration after updating, use the get method. If you wish to
enable or disable SSO, please use the enable and disable methods
instead.
| PARAMETER | DESCRIPTION |
|---|---|
|
The URL to the SSO metadata document.
TYPE:
|
|
The SSO metadata document as a string.
TYPE:
|
| RAISES | DESCRIPTION |
|---|---|
HTTPError
|
If the response status code is not 2xx. |