🔍 Code Extractor

class SamlOrWsFedProvider

Maturity: 48

An abstract class that provides configuration details for setting up SAML or WS-Fed external domain-based identity provider (IdP) integrations.

File:
/tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/directory/identities/providers/saml_or_wsfed.py
Lines:
4 - 15
Complexity:
simple

Purpose

This class serves as a specialized identity provider configuration container for SAML (Security Assertion Markup Language) and WS-Fed (WS-Federation) authentication protocols. It extends IdentityProviderBase to provide specific configuration properties needed for federated authentication scenarios, particularly the issuer URI which identifies the federation server. This class is typically used in enterprise identity management systems where external identity providers need to be configured for single sign-on (SSO) scenarios.

Source Code

class SamlOrWsFedProvider(IdentityProviderBase):
    """An abstract type that provides configuration details for setting up a SAML or WS-Fed external domain-based
    identity provider (IdP)."""

    @property
    def issuer_uri(self):
        """
        Issuer URI of the federation server.

        :rtype: str
        """
        return self.properties.get("issuerUri", None)

Parameters

Name Type Default Kind
bases IdentityProviderBase -

Parameter Details

bases: Inherits from IdentityProviderBase, which provides the foundational identity provider functionality and the 'properties' dictionary used to store configuration data

Return Value

Instantiation returns a SamlOrWsFedProvider object that can be used to access and manage SAML/WS-Fed identity provider configuration. The issuer_uri property returns a string containing the federation server's issuer URI, or None if not configured.

Class Interface

Methods

@property issuer_uri(self) -> str property

Purpose: Retrieves the issuer URI of the federation server from the provider's configuration

Returns: A string containing the issuer URI of the federation server, or None if not configured. The issuer URI uniquely identifies the SAML/WS-Fed identity provider.

Attributes

Name Type Description Scope
properties dict Inherited from IdentityProviderBase. A dictionary containing configuration properties for the identity provider, including 'issuerUri' and potentially other SAML/WS-Fed specific settings instance

Dependencies

  • office365

Required Imports

from office365.directory.identities.providers.base import IdentityProviderBase
from office365.directory.identities.providers.saml_or_wsfed import SamlOrWsFedProvider

Usage Example

# Assuming the class is instantiated through Office 365 SDK context
# Typically retrieved from Azure AD/Microsoft Graph API

# Example 1: Accessing issuer URI from an existing provider
provider = SamlOrWsFedProvider()
# The properties dictionary would be populated by the parent class/SDK
provider.properties = {'issuerUri': 'https://sts.example.com/adfs'}
issuer = provider.issuer_uri
print(f"Federation server issuer: {issuer}")

# Example 2: Checking if issuer URI is configured
if provider.issuer_uri:
    print(f"Provider configured with issuer: {provider.issuer_uri}")
else:
    print("No issuer URI configured")

Best Practices

  • This is an abstract class meant to be used within the Office 365 SDK ecosystem, typically instantiated and populated by the SDK rather than directly by user code
  • The issuer_uri property is read-only and retrieves data from the internal properties dictionary
  • Always check if issuer_uri returns None before using it, as it may not be configured
  • This class should be used in conjunction with the Office 365 SDK's authentication and identity management workflows
  • The properties dictionary is managed by the parent IdentityProviderBase class and should be populated through proper SDK methods
  • Do not directly modify the properties dictionary unless you understand the full SDK lifecycle
  • This class is designed for federated identity scenarios where an external identity provider handles authentication

Similar Components

AI-powered semantic similarity - components with related functionality:

  • class IdentityProviderBase 60.0% similar

    Represents identity providers with External Identities for both Azure Active Directory tenant and Azure AD B2C tenant, providing access to identity provider properties.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/directory/identities/providers/base.py
  • class SamlTokenProvider 59.8% similar

    Provides SAML-based claims authentication for Office 365 SharePoint Online, handling security token acquisition and cookie-based authentication.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/runtime/auth/providers/saml_token_provider.py
  • class SocialIdentityProvider 59.6% similar

    A class representing social identity providers for Azure Active Directory (Azure AD) and Azure AD B2C tenants, providing access to OAuth client credentials and provider type information.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/directory/identities/providers/social_identity.py
  • class AuthenticationProvider 55.7% similar

    Abstract base class that defines the interface for authentication providers in the Office365 runtime library.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/runtime/auth/authentication_provider.py
  • class BuiltInIdentityProvider 55.7% similar

    A class representing built-in identity providers with External Identities for an Azure Active Directory tenant, specifically for B2B scenarios.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/directory/identities/providers/builtin_identity.py
← Back to Browse