mirror of
https://github.com/ansible/awx.git
synced 2026-02-19 20:20:06 -03:30
remove implicit grant type for OAuth 2 apps
This commit is contained in:
@@ -1108,7 +1108,7 @@ class UserAuthorizedTokenSerializer(BaseOAuth2TokenSerializer):
|
||||
)
|
||||
obj = super(UserAuthorizedTokenSerializer, self).create(validated_data)
|
||||
obj.save()
|
||||
if obj.application and obj.application.authorization_grant_type != 'implicit':
|
||||
if obj.application:
|
||||
RefreshToken.objects.create(
|
||||
user=current_user,
|
||||
token=generate_token(),
|
||||
@@ -1130,7 +1130,7 @@ class OAuth2TokenSerializer(BaseOAuth2TokenSerializer):
|
||||
if obj.application and obj.application.user:
|
||||
obj.user = obj.application.user
|
||||
obj.save()
|
||||
if obj.application and obj.application.authorization_grant_type != 'implicit':
|
||||
if obj.application:
|
||||
RefreshToken.objects.create(
|
||||
user=current_user,
|
||||
token=generate_token(),
|
||||
|
||||
Reference in New Issue
Block a user