def get_saml_assertion()

in redshift_connector/plugin/azure_credentials_provider.py [0:0]


    def get_saml_assertion(self: "AzureCredentialsProvider") -> str:
        # idp_tenant, client_secret, and client_id are
        # all required parameters to be able to authenticate with Microsoft Azure.
        # user and password are also required and need to be set to the username and password of the
        # Microsoft Azure account that is logging in.
        if self.user_name == "" or self.user_name is None:
            raise InterfaceError("Missing required property: user_name")
        if self.password == "" or self.password is None:
            raise InterfaceError("Missing required property: password")
        if self.idp_tenant == "" or self.idp_tenant is None:
            raise InterfaceError("Missing required property: idp_tenant")
        if self.client_secret == "" or self.client_secret is None:
            raise InterfaceError("Missing required property: client_secret")
        if self.client_id == "" or self.client_id is None:
            raise InterfaceError("Missing required property: client_id")

        return self.azure_oauth_based_authentication()