TokenChangeHistoryEntry#

class gafaelfawr.models.history.TokenChangeHistoryEntry(**data)#

Bases: BaseModel

A record of a change to a token.

Parameters:

data (Any) –

Methods Summary

reduced_dict()

Custom dict method to suppress some fields.

Methods Documentation

reduced_dict()#

Custom dict method to suppress some fields.

Excludes the old_ fields for changes other than edits, and when the edit doesn’t change those fields.

Returns:

Dictionary representation of the object.

Return type:

dict

Notes

Knowing which fields to exclude requires understanding the semantics of the change (particularly when deciding whether to drop old_expires) in ways that are too complex to do with the standard Pydantic filtering API, hence the hand-rolled method.