fix IDP-Initiated SAML Login

This commit is contained in:
Jens Langhammer
2019-04-29 21:39:41 +02:00
parent 7033ec0ab9
commit e0a3ec033f
3 changed files with 12 additions and 2 deletions

View File

@ -1,4 +1,5 @@
"""passbook saml_idp Models"""
from logging import getLogger
from django.contrib.postgres.fields import ArrayField
from django.db import models
@ -9,6 +10,8 @@ from passbook.core.models import PropertyMapping, Provider
from passbook.lib.utils.reflection import class_to_path, path_to_class
from passbook.saml_idp.base import Processor
LOGGER = getLogger(__name__)
class SAMLProvider(Provider):
"""Model to save information about a Remote SAML Endpoint"""
@ -36,7 +39,8 @@ class SAMLProvider(Provider):
if not self._processor:
try:
self._processor = path_to_class(self.processor_path)(self)
except ModuleNotFoundError:
except ModuleNotFoundError as exc:
LOGGER.warning(exc)
self._processor = None
return self._processor