providers/oauth2: don't write authorization code to event log

This commit is contained in:
Jens Langhammer 2020-12-28 01:06:36 +01:00
parent dc16a8a4c9
commit 0e1587bc1a
2 changed files with 26 additions and 2 deletions

View file

@ -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):

View file

@ -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