diff --git a/authentik/providers/oauth2/models.py b/authentik/providers/oauth2/models.py index 6dd5ab3c9..dc0511e19 100644 --- a/authentik/providers/oauth2/models.py +++ b/authentik/providers/oauth2/models.py @@ -398,7 +398,7 @@ class AuthorizationCode(ExpiringModel, BaseGrantModel): verbose_name_plural = _("Authorization Codes") def __str__(self): - return "{0} - {1}".format(self.provider, self.code) + return f"Authorization code for {self.provider} for user {self.user}" @dataclass @@ -461,7 +461,7 @@ class RefreshToken(ExpiringModel, BaseGrantModel): self._id_token = json.dumps(asdict(value)) def __str__(self): - return f"{self.provider} - {self.access_token}" + return f"Refresh Token for {self.provider} for user {self.access_token.user}" @property def at_hash(self): diff --git a/swagger.yaml b/swagger.yaml index 6aca8b15b..5da72c14d 100755 --- a/swagger.yaml +++ b/swagger.yaml @@ -8133,6 +8133,14 @@ definitions: type: string format: uuid x-nullable: true + verbose_name: + title: Verbose name + type: string + readOnly: true + verbose_name_plural: + title: Verbose name plural + type: string + readOnly: true __type__: title: 'type ' type: string @@ -8181,6 +8189,14 @@ definitions: type: string format: uuid x-nullable: true + verbose_name: + title: Verbose name + type: string + readOnly: true + verbose_name_plural: + title: Verbose name plural + type: string + readOnly: true server_uri: title: Server URI type: string @@ -8296,6 +8312,14 @@ definitions: type: string format: uuid x-nullable: true + verbose_name: + title: Verbose name + type: string + readOnly: true + verbose_name_plural: + title: Verbose name plural + type: string + readOnly: true provider_type: title: Provider type type: string