Projet

Général

Profil

0002-auth_oidc-drop-now-redundant-django-jsonfield-depend.patch

Paul Marillonnet, 21 novembre 2019 17:13

Télécharger (3,03 ko)

Voir les différences:

Subject: [PATCH 2/3] auth_oidc: drop now-redundant django-jsonfield dependency

 setup.py                                            | 1 -
 src/authentic2_auth_oidc/migrations/0001_initial.py | 4 ++--
 src/authentic2_auth_oidc/models.py                  | 2 +-
 3 files changed, 3 insertions(+), 4 deletions(-)
setup.py
132 132
          'pycryptodome',
133 133
          'django-mellon',
134 134
          'ldaptools',
135
          'django-jsonfield<1.3',
136 135
          'jwcrypto>=0.3.1,<1',
137 136
          'cryptography',
138 137
          'XStatic-jQuery<2',
src/authentic2_auth_oidc/migrations/0001_initial.py
2 2
from __future__ import unicode_literals
3 3

  
4 4
from django.db import migrations, models
5
import jsonfield.fields
6 5
import authentic2.a2_rbac.utils
7 6
import authentic2_auth_oidc.models
7
import django.contrib.postgres.fields.jsonb
8 8
from django.conf import settings
9 9
import uuid
10 10

  
......
52 52
                ('userinfo_endpoint', models.URLField(max_length=128, verbose_name='userinfo endpoint')),
53 53
                ('end_session_endpoint', models.URLField(max_length=128, null=True, verbose_name='end session endpoint', blank=True)),
54 54
                ('scopes', models.CharField(max_length=128, verbose_name='scopes', blank=True)),
55
                ('jwkset_json', jsonfield.fields.JSONField(blank=True, null=True, verbose_name='JSON WebKey set', validators=[authentic2_auth_oidc.models.validate_jwkset])),
55
                ('jwkset_json', django.contrib.postgres.fields.jsonb.JSONField(blank=True, null=True, verbose_name='JSON WebKey set', validators=[authentic2_auth_oidc.models.validate_jwkset])),
56 56
                ('idtoken_algo', models.PositiveIntegerField(default=1, verbose_name='IDToken signature algorithm', choices=[(0, 'none'), (1, 'RSA'), (2, 'HMAC')])),
57 57
                ('strategy', models.CharField(max_length=32, verbose_name='strategy', choices=[(b'create', 'create'), (b'none', 'none')])),
58 58
                ('max_auth_age', models.PositiveIntegerField(null=True, verbose_name='max authentication age', blank=True)),
src/authentic2_auth_oidc/models.py
23 23
from django.conf import settings
24 24
from django.core.exceptions import ValidationError
25 25

  
26
from jsonfield import JSONField
26
from django.contrib.postgres.fields import JSONField
27 27

  
28 28
from jwcrypto.jwk import JWKSet, InvalidJWKValue, JWK
29 29

  
30
-