api.saml.metadata.federations package¶
Submodules¶
api.saml.metadata.federations.incommon module¶
api.saml.metadata.federations.loader module¶
- class api.saml.metadata.federations.loader.SAMLFederatedIdentityProviderLoader(loader, validator, parser)[source]¶
Bases:
object
Loads metadata of federated IdPs from the specified metadata service.
- ENGLISH_LANGUAGE_CODES = ('en', 'eng')¶
- load(federation)[source]¶
Loads metadata of federated IdPs from the specified metadata service.
- Parameters:
federation (api.saml.metadata.federations.model.SAMLFederation) – SAML federation where loaded IdPs belong to
- Returns:
List of SAMLFederatedIdP objects
- Return type:
Iterable[api.saml.configuration.SAMLFederatedIdentityProvider]
api.saml.metadata.federations.model module¶
api.saml.metadata.federations.validator module¶
- class api.saml.metadata.federations.validator.SAMLFederatedMetadataExpirationValidator[source]¶
Bases:
SAMLFederatedMetadataValidator
Verifies that federated SAML metadata has not expired.
- MAX_CLOCK_SKEW = datetime.timedelta(seconds=300)¶
- MAX_VALID_TIME = datetime.timedelta(days=28)¶
- validate(federation, metadata)[source]¶
Verify that federated SAML metadata has not expired.
- Parameters:
federation (api.saml.metadata.federations.model.SAMLFederation) – SAML federation
metadata (str) – SAML federation’s aggregated metadata
- Raises:
SAMLFederatedMetadataValidationError – in the case of validation errors
- exception api.saml.metadata.federations.validator.SAMLFederatedMetadataValidationError(message=None, inner_exception=None)[source]¶
Bases:
BaseError
Raised in the case of any errors happened during SAML metadata validation.
- class api.saml.metadata.federations.validator.SAMLFederatedMetadataValidator[source]¶
Bases:
object
Base class for all validators checking correctness of SAML federated metadata.
- validate(federation, metadata)[source]¶
Validate SAML federated metadata.
- Parameters:
federation (api.saml.metadata.federations.model.SAMLFederation) – SAML federation
metadata (str) – SAML federation’s aggregated metadata
- Raises:
SAMLFederatedMetadataValidationError – in the case of validation errors
- class api.saml.metadata.federations.validator.SAMLFederatedMetadataValidatorChain(validators)[source]¶
Bases:
SAMLFederatedMetadataValidator
- validate(federation, metadata)[source]¶
Validate SAML federated metadata using a chain of inner validators.
- Parameters:
federation (api.saml.metadata.federations.model.SAMLFederation) – SAML federation
metadata (str) – SAML federation’s aggregated metadata
- Raises:
SAMLFederatedMetadataValidationError – in the case of validation errors
- class api.saml.metadata.federations.validator.SAMLMetadataSignatureValidator[source]¶
Bases:
SAMLFederatedMetadataValidator
Verifies the validity of federated SAML metadata’s signature.
- validate(federation, metadata)[source]¶
Verify the validity of the SAML federated metadata’s signature.
- Parameters:
federation (api.saml.metadata.federations.model.SAMLFederation) – SAML federation
metadata (str) – SAML federation’s aggregated metadata
- Raises:
SAMLFederatedMetadataValidationError – in the case of validation errors