-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle document expiration web-hook and updates verification status (#19
) * handle document expiration webhook and updates verification status * log parsed clientID * use const to prevents typos when using common headers and query parameters * fix processClientID false positive in suffix validation * log plain requets body not the base64 version * verifiy twinId query paramter early in the handler * prevent logging sensitive data from the Verification struct * use timeout for handling ProcessDocExpirationNotification * implement toOutcome on Verification struct * refactor Verification.ToOutcome
- Loading branch information
1 parent
d9040bf
commit e0883d7
Showing
9 changed files
with
258 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package models | ||
|
||
type ExpirationThreshold string | ||
|
||
const ( | ||
ExpiresWithin30Days ExpirationThreshold = "DOCUMENT_EXPIRES_WITHIN_30_DAYS" | ||
ExpiresWithin7Days ExpirationThreshold = "DOCUMENT_EXPIRES_WITHIN_7_DAYS" | ||
ExpiresWithin1Day ExpirationThreshold = "DOCUMENT_EXPIRES_WITHIN_1_DAY" | ||
DocumentExpired ExpirationThreshold = "DOCUMENT_EXPIRED" | ||
) | ||
|
||
type DocExpirationNotification struct { | ||
ScanRef string `json:"scanRef"` | ||
ClientID string `json:"clientId"` | ||
ExpirationThreshold ExpirationThreshold `json:"expirationThreshold"` | ||
DocumentExpiration string `json:"documentExpiration"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.