Add default name id format option to service provider model
This commit is contained in:
parent
e0f76d6f68
commit
8d7923cce3
|
@ -1,5 +1,6 @@
|
|||
from django.db import models
|
||||
from django.contrib.auth.models import User
|
||||
import lasso
|
||||
|
||||
# Configuration models
|
||||
def fix_name(name):
|
||||
|
@ -43,14 +44,22 @@ class LibertyServiceProvider(LibertyProvider):
|
|||
verbose_name = "Allow IdP iniated SSO")
|
||||
# Mapping to use to produce attributes in the assertions or in Attribute
|
||||
# requests
|
||||
attribute_map = models.ForeignKey(SamlAttributeMap,
|
||||
attribute_map = models.ForeignKey(LibertyAttributeMap,
|
||||
related_name = "service_providers")
|
||||
# XXX: format in the metadata file, should be suffixed with a start to mark
|
||||
# them as special
|
||||
default_name_id_format = models.CharField(max_length = 80,
|
||||
default = "persistent",
|
||||
choices = (("persistent", "Persistent"),
|
||||
("transient", "Transient"),
|
||||
("email", "Email (only supported by SAMLv2)")))
|
||||
|
||||
|
||||
class LibertyIdentityProvider(LibertyProvider):
|
||||
want_authn_request_signed = models.BooleanField(
|
||||
verbose_name = "Want AuthnRequest signed")
|
||||
# Mapping to use to get User attributes from the assertion
|
||||
attribute_map = models.ForeignKey(SamlAttributeMap,
|
||||
attribute_map = models.ForeignKey(LibertyAttributeMap,
|
||||
related_name = "identity_providers")
|
||||
|
||||
# Transactional models
|
||||
|
|
Loading…
Reference in New Issue