class SamlOrWsFedProvider
An abstract class that provides configuration details for setting up SAML or WS-Fed external domain-based identity provider (IdP) integrations.
/tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/directory/identities/providers/saml_or_wsfed.py
4 - 15
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
Tags
Similar Components
AI-powered semantic similarity - components with related functionality:
-
class IdentityProviderBase 60.0% similar
-
class SamlTokenProvider 59.8% similar
-
class SocialIdentityProvider 59.6% similar
-
class AuthenticationProvider 55.7% similar
-
class BuiltInIdentityProvider 55.7% similar