providers/saml: change assertion_valid_not_before default to -5 minutes

This commit is contained in:
Jens Langhammer 2020-02-17 21:32:23 +01:00
parent 04a5428148
commit aeca66a288
2 changed files with 28 additions and 3 deletions

View File

@ -0,0 +1,25 @@
# Generated by Django 3.0.3 on 2020-02-17 20:31
from django.db import migrations, models
import passbook.providers.saml.utils.time
class Migration(migrations.Migration):
dependencies = [
("passbook_providers_saml", "0005_remove_samlpropertymapping_values"),
]
operations = [
migrations.AlterField(
model_name="samlprovider",
name="assertion_valid_not_before",
field=models.TextField(
default="minutes=-5",
help_text="Assertion valid not before current time + this value (Format: hours=-1;minutes=-2;seconds=-3).",
validators=[
passbook.providers.saml.utils.time.timedelta_string_validator
],
),
),
]

View File

@ -23,12 +23,12 @@ class SAMLProvider(Provider):
issuer = models.TextField()
assertion_valid_not_before = models.TextField(
default="minutes=5",
default="minutes=-5",
validators=[timedelta_string_validator],
help_text=_(
(
"Assertion valid not before current time - this value "
"(Format: hours=1;minutes=2;seconds=3)."
"Assertion valid not before current time + this value "
"(Format: hours=-1;minutes=-2;seconds=-3)."
)
),
)