feat(identity): add server sessions and audited mail recovery
This commit is contained in:
1 parent
20c03288d6
commit
4ee53d9a74
58 files changed
+5359
-567
No files matched your search
@@ -0,0 +1,18 @@
|
||||
package domain
|
||||
|
||||
import "regexp"
|
||||
|
||||
var mailRetryActorPattern = regexp.MustCompile(`^operator:[a-z0-9][a-z0-9._-]*$`)
|
||||
|
||||
// MailRetryActor identifies an operator who authorized a retry of an unknown
|
||||
// delivery. It is a handle, not an account ID, email address, or credential.
|
||||
type MailRetryActor string
|
||||
|
||||
// ParseMailRetryActor accepts an operator handle in the form
|
||||
// "operator:<handle>".
|
||||
func ParseMailRetryActor(value string) (MailRetryActor, error) {
|
||||
if len(value) > 128 || !mailRetryActorPattern.MatchString(value) {
|
||||
return "", invalidDelivery("domain.ParseMailRetryActor", "actor must be operator:<handle> of at most 128 bytes in lowercase letters, digits, '.', '_', or '-'")
|
||||
}
|
||||
return MailRetryActor(value), nil
|
||||
}
|
||||
Reference in new issue
Block a user