1515from saml2 .extension .ui import NAMESPACE as UI_NAMESPACE
1616from saml2 .metadata import create_metadata_string
1717
18+ from satosa .base import SAMLBaseModule
1819from .base import BackendModule
1920from ..exception import SATOSAAuthenticationError
2021from ..internal_data import (InternalResponse ,
2930logger = logging .getLogger (__name__ )
3031
3132
32- class SAMLBackend (BackendModule ):
33+ class SAMLBackend (BackendModule , SAMLBaseModule ):
3334 """
3435 A saml2 backend module (acting as a SP).
3536 """
@@ -51,7 +52,6 @@ def __init__(self, outgoing, internal_attributes, config, base_url, name):
5152 :param name: name of the plugin
5253 """
5354 super ().__init__ (outgoing , internal_attributes , base_url , name )
54-
5555 sp_config = SPConfig ().load (copy .deepcopy (config ["sp_config" ]), False )
5656 self .sp = Base (sp_config )
5757
@@ -278,6 +278,11 @@ def register_endpoints(self):
278278 url_map .append (
279279 ("^%s$" % parsed_endp .path [1 :], self .disco_response ))
280280
281+ if self .expose_entityid_endpoint ():
282+ parsed_entity_id = urlparse (self .sp .config .entityid )
283+ url_map .append (("^{0}" .format (parsed_entity_id .path [1 :]),
284+ self ._metadata_endpoint ))
285+
281286 return url_map
282287
283288 def get_metadata_desc (self ):
0 commit comments