mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-06 15:05:03 -04:00
Code cleanups and simplifications.
Also: share the saml client between redirect and response handlers.
This commit is contained in:
parent
69a43d9974
commit
426049247b
6 changed files with 53 additions and 50 deletions
|
@ -12,6 +12,7 @@
|
|||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
from synapse.python_dependencies import DependencyException, check_requirements
|
||||
|
||||
from ._base import Config, ConfigError
|
||||
|
||||
|
@ -25,6 +26,11 @@ class SAML2Config(Config):
|
|||
if not saml2_config or not saml2_config.get("enabled", True):
|
||||
return
|
||||
|
||||
try:
|
||||
check_requirements('saml2')
|
||||
except DependencyException as e:
|
||||
raise ConfigError(e.message)
|
||||
|
||||
self.saml2_enabled = True
|
||||
|
||||
import saml2.config
|
||||
|
@ -75,7 +81,6 @@ class SAML2Config(Config):
|
|||
# override them.
|
||||
#
|
||||
#saml2_config:
|
||||
# enabled: true
|
||||
# sp_config:
|
||||
# # point this to the IdP's metadata. You can use either a local file or
|
||||
# # (preferably) a URL.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue