Skip to content

Commit 0c99888

Browse files
committed
Clarify comments in ExpiresAt and GrantDuration
1 parent b475524 commit 0c99888

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

exchange/consent-engine/v1/models/consent.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ type ConsentRecord struct {
2323
UpdatedAt time.Time `json:"updated_at"`
2424
// ExpiresAt is the timestamp when the consent expires
2525
// Calculated by adding GrantDuration to the current time when consent is approved/denied
26+
// To check if consent has expired: compare ExpiresAt < current_time
2627
ExpiresAt time.Time `json:"expires_at"`
2728
// GrantDuration is the duration to add to current time when approving/denying consent (e.g., "P30D", "1h")
2829
// Used to calculate ExpiresAt: ExpiresAt = current_time + GrantDuration

0 commit comments

Comments
 (0)