Fix refresh_token cannot be primary key if null.
This commit is contained in:
parent
1081511b9a
commit
66a3497a1c
2 changed files with 22 additions and 1 deletions
21
oidc_provider/migrations/0021_refresh_token_not_unique.py
Normal file
21
oidc_provider/migrations/0021_refresh_token_not_unique.py
Normal file
|
@ -0,0 +1,21 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.10 on 2016-12-12 19:44
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('oidc_provider', '0020_client__post_logout_redirect_uris'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='token',
|
||||
name='refresh_token',
|
||||
field=models.CharField(default='', max_length=255, unique=True, verbose_name='Refresh Token'),
|
||||
preserve_default=False,
|
||||
),
|
||||
]
|
|
@ -125,7 +125,7 @@ class Code(BaseCodeTokenModel):
|
|||
class Token(BaseCodeTokenModel):
|
||||
|
||||
access_token = models.CharField(max_length=255, unique=True, verbose_name=_(u'Access Token'))
|
||||
refresh_token = models.CharField(max_length=255, unique=True, null=True, verbose_name=_(u'Refresh Token'))
|
||||
refresh_token = models.CharField(max_length=255, unique=True, verbose_name=_(u'Refresh Token'))
|
||||
_id_token = models.TextField(verbose_name=_(u'ID Token'))
|
||||
|
||||
def id_token():
|
||||
|
|
Loading…
Reference in a new issue