From 6cd9edd38acff110cf8a84df9e5978d5d86b8fb4 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Thu, 1 Oct 2020 20:01:28 +0200 Subject: [PATCH] providers/oauth2: add missing token_validity field to Forms and API --- passbook/providers/oauth2/api.py | 1 + passbook/providers/oauth2/forms.py | 2 ++ swagger.yaml | 6 ++++++ 3 files changed, 9 insertions(+) diff --git a/passbook/providers/oauth2/api.py b/passbook/providers/oauth2/api.py index 7283f9dce2..fc0d75862d 100644 --- a/passbook/providers/oauth2/api.py +++ b/passbook/providers/oauth2/api.py @@ -18,6 +18,7 @@ class OAuth2ProviderSerializer(ModelSerializer): "client_type", "client_id", "client_secret", + "token_validity", "response_type", "jwt_alg", "rsa_key", diff --git a/passbook/providers/oauth2/forms.py b/passbook/providers/oauth2/forms.py index cf39db417f..2b7e6f0331 100644 --- a/passbook/providers/oauth2/forms.py +++ b/passbook/providers/oauth2/forms.py @@ -38,6 +38,7 @@ class OAuth2ProviderForm(forms.ModelForm): "client_id", "client_secret", "response_type", + "token_validity", "jwt_alg", "rsa_key", "redirect_uris", @@ -46,6 +47,7 @@ class OAuth2ProviderForm(forms.ModelForm): ] widgets = { "name": forms.TextInput(), + "token_validity": forms.TextInput(), } labels = {"property_mappings": _("Scopes")} help_texts = { diff --git a/swagger.yaml b/swagger.yaml index 1412f9cbc6..7b322edb6f 100755 --- a/swagger.yaml +++ b/swagger.yaml @@ -6648,6 +6648,12 @@ definitions: title: Client Secret type: string maxLength: 255 + token_validity: + title: Token validity + description: 'Tokens not valid on or after current time + this value (Format: + hours=1;minutes=2;seconds=3).' + type: string + minLength: 1 response_type: title: Response type description: Response Type required by the client.