add response_type to AuthCode and OauthToken model
This commit is contained in:
parent
19666b2c93
commit
e563dff496
|
@ -340,6 +340,9 @@ class AuthorizationCode(db.Model, ModelMixin):
|
|||
scope = db.Column(db.String(128))
|
||||
redirect_uri = db.Column(db.String(1024))
|
||||
|
||||
# what is the input response_type, e.g. "code", "code,id_token", ...
|
||||
response_type = db.Column(db.String(128))
|
||||
|
||||
user = db.relationship(User, lazy=False)
|
||||
client = db.relationship(Client, lazy=False)
|
||||
|
||||
|
@ -352,6 +355,9 @@ class OauthToken(db.Model, ModelMixin):
|
|||
scope = db.Column(db.String(128))
|
||||
redirect_uri = db.Column(db.String(1024))
|
||||
|
||||
# what is the input response_type, e.g. "token", "token,id_token", ...
|
||||
response_type = db.Column(db.String(128))
|
||||
|
||||
user = db.relationship(User)
|
||||
client = db.relationship(Client)
|
||||
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
"""empty message
|
||||
|
||||
Revision ID: 507afb2632cc
|
||||
Revises: 1b7d161d1012
|
||||
Create Date: 2019-08-11 11:58:33.954561
|
||||
|
||||
"""
|
||||
import sqlalchemy_utils
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '507afb2632cc'
|
||||
down_revision = '1b7d161d1012'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column('authorization_code', sa.Column('response_type', sa.String(length=128), nullable=True))
|
||||
op.add_column('oauth_token', sa.Column('response_type', sa.String(length=128), nullable=True))
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_column('oauth_token', 'response_type')
|
||||
op.drop_column('authorization_code', 'response_type')
|
||||
# ### end Alembic commands ###
|
Loading…
Reference in New Issue