From 87829ea339b644651d8cd158630924632e54ea03 Mon Sep 17 00:00:00 2001 From: adamscmRH Date: Wed, 25 Jul 2018 18:23:08 -0400 Subject: [PATCH] remove client credentials grant_type --- ...45_v330_remove_client_credentials_grant.py | 20 +++++++++++++++++++ awx/main/models/oauth.py | 2 -- 2 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 awx/main/migrations/0045_v330_remove_client_credentials_grant.py diff --git a/awx/main/migrations/0045_v330_remove_client_credentials_grant.py b/awx/main/migrations/0045_v330_remove_client_credentials_grant.py new file mode 100644 index 0000000000..db919c55b7 --- /dev/null +++ b/awx/main/migrations/0045_v330_remove_client_credentials_grant.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.11 on 2018-07-25 21:24 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('main', '0044_v330_add_inventory_update_inventory'), + ] + + operations = [ + migrations.AlterField( + model_name='oauth2application', + name='authorization_grant_type', + field=models.CharField(choices=[(b'authorization-code', 'Authorization code'), (b'implicit', 'Implicit'), (b'password', 'Resource owner password-based')], help_text='The Grant type the user must use for acquire tokens for this application.', max_length=32), + ), + ] diff --git a/awx/main/models/oauth.py b/awx/main/models/oauth.py index 4e575871fe..63a70ac016 100644 --- a/awx/main/models/oauth.py +++ b/awx/main/models/oauth.py @@ -39,12 +39,10 @@ class OAuth2Application(AbstractApplication): GRANT_AUTHORIZATION_CODE = "authorization-code" GRANT_IMPLICIT = "implicit" GRANT_PASSWORD = "password" - GRANT_CLIENT_CREDENTIALS = "client-credentials" GRANT_TYPES = ( (GRANT_AUTHORIZATION_CODE, _("Authorization code")), (GRANT_IMPLICIT, _("Implicit")), (GRANT_PASSWORD, _("Resource owner password-based")), - (GRANT_CLIENT_CREDENTIALS, _("Client credentials")), ) description = models.TextField(