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") verbose_name_plural = _("Authorization Codes")
def __str__(self): def __str__(self):
return "{0} - {1}".format(self.provider, self.code) return f"Authorization code for {self.provider} for user {self.user}"
@dataclass @dataclass
@ -461,7 +461,7 @@ class RefreshToken(ExpiringModel, BaseGrantModel):
self._id_token = json.dumps(asdict(value)) self._id_token = json.dumps(asdict(value))
def __str__(self): def __str__(self):
return f"{self.provider} - {self.access_token}" return f"Refresh Token for {self.provider} for user {self.access_token.user}"
@property @property
def at_hash(self): def at_hash(self):

View file

@ -8133,6 +8133,14 @@ definitions:
type: string type: string
format: uuid format: uuid
x-nullable: true x-nullable: true
verbose_name:
title: Verbose name
type: string
readOnly: true
verbose_name_plural:
title: Verbose name plural
type: string
readOnly: true
__type__: __type__:
title: 'type ' title: 'type '
type: string type: string
@ -8181,6 +8189,14 @@ definitions:
type: string type: string
format: uuid format: uuid
x-nullable: true 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: server_uri:
title: Server URI title: Server URI
type: string type: string
@ -8296,6 +8312,14 @@ definitions:
type: string type: string
format: uuid format: uuid
x-nullable: true 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: provider_type:
title: Provider type title: Provider type
type: string type: string