diff --git a/README.md b/README.md index e324be0..a1529a8 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ Environment Variables | VALIDATE_EMAIL_WHITELIST | | | use ',' to separate emails; the emails in it will not be checked for year vs. suffix | | EMAIL_SERVER_NO_REPLY_URL | | | required in "production" mode; if not set, unable to send verification email | | EMAIL_DOMAIN | | | required in "production" mode; if not set, unable to send verification email | -| EMAIL_DEV | dev@fduhole.com | | send email if shamir update failed | +| EMAIL_DEV | dev@danta.tech | | send email if shamir update failed | | SHAMIR_FEATURE | true | | if enabled, check email shamir encryption when users register and login | | STANDALONE | false | | if not set, this application not required to set KONG_URL | | VERIFICATION_CODE_EXPIRES | 10 | integers | register verification code expiration time | diff --git a/apis/default.go b/apis/default.go index 5a8f5a3..b828429 100644 --- a/apis/default.go +++ b/apis/default.go @@ -26,7 +26,7 @@ func Index(c *fiber.Ctx) error { Homepage: "https://github.com/opentreehole", Repository: "https://github.com/OpenTreeHole/auth_next", Author: "JingYiJun", - Email: "dev@fduhole.com", + Email: "dev@danta.tech", License: "Apache-2.0", }) } diff --git a/apis/shamir.go b/apis/shamir.go index ae5862e..338fd1a 100644 --- a/apis/shamir.go +++ b/apis/shamir.go @@ -51,7 +51,7 @@ func GetPGPMessageByUserID(c *fiber.Ctx) error { } if !IsShamirAdmin(userID) { - return common.Forbidden("only admin can get pgp message") + return common.Forbidden("only shamir admin can get pgp message") } // get target user id @@ -109,7 +109,7 @@ func ListPGPMessages(c *fiber.Ctx) error { } if !IsShamirAdmin(userID) { - return common.Forbidden("only admin can get pgp message") + return common.Forbidden("only shamir admin can get pgp message") } // list pgp messages @@ -157,7 +157,7 @@ func UploadAllShares(c *fiber.Ctx) error { } if !IsShamirAdmin(userID) { - return common.Forbidden("only admin can upload shares") + return common.Forbidden("only shamir admin can upload shares") } // lock @@ -219,7 +219,7 @@ func UploadPublicKey(c *fiber.Ctx) error { } if !IsShamirAdmin(userID) { - return common.Forbidden("only admin can upload public keys") + return common.Forbidden("only shamir admin can upload public keys") } GlobalUploadShamirStatus.Lock() @@ -276,7 +276,7 @@ func GetShamirStatus(c *fiber.Ctx) error { } if !IsShamirAdmin(userID) { - return common.Forbidden("only admin can get shamir status") + return common.Forbidden("only shamir admin can get shamir status") } GlobalUploadShamirStatus.Lock() @@ -303,7 +303,7 @@ func UpdateShamir(c *fiber.Ctx) error { } if !IsShamirAdmin(userID) { - return common.Forbidden("only admin can update shamir") + return common.Forbidden("only shamir admin can update shamir") } GlobalUploadShamirStatus.Lock() @@ -345,7 +345,7 @@ func RefreshShamir(c *fiber.Ctx) error { } if !IsShamirAdmin(userID) { - return common.Forbidden("only admin can refresh shamir") + return common.Forbidden("only shamir admin can refresh shamir") } GlobalUploadShamirStatus.Lock() @@ -602,7 +602,7 @@ func UploadUserShares(c *fiber.Ctx) error { } if !IsShamirAdmin(userID) { - return common.Forbidden("only admin can upload user shares") + return common.Forbidden("only shamir admin can upload user shares") } GlobalUserSharesStatus.Lock() @@ -651,7 +651,7 @@ func GetDecryptedUserEmail(c *fiber.Ctx) error { } if !IsShamirAdmin(userID) { - return common.Forbidden("only admin can decrypt email") + return common.Forbidden("only shamir admin can decrypt email") } // get target user id @@ -716,7 +716,7 @@ func GetDecryptStatusbyUserID(c *fiber.Ctx) error { } if !IsShamirAdmin(userID) { - return common.Forbidden("only admin can get decrypt status") + return common.Forbidden("only shamir admin can get decrypt status") } // get target user id diff --git a/config/config.go b/config/config.go index c6706a2..22dba4f 100644 --- a/config/config.go +++ b/config/config.go @@ -24,7 +24,7 @@ var Config struct { ValidateEmailWhitelist []string EmailServerNoReplyUrl url.URL `env:"EMAIL_SERVER_NO_REPLY_URL"` EmailDomain string - EmailDev string `envDefault:"dev@fduhole.com"` + EmailDev string `envDefault:"dev@danta.tech"` ShamirFeature bool `envDefault:"true"` Standalone bool VerificationCodeExpires int `envDefault:"10"` diff --git a/docs/docs.go b/docs/docs.go index 4571591..920f3f2 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -12,7 +12,7 @@ const docTemplate = `{ "contact": { "name": "Maintainer Chen Ke", "url": "https://danxi.fduhole.com/about", - "email": "dev@fduhole.com" + "email": "dev@danta.tech" }, "license": { "name": "Apache 2.0", diff --git a/docs/swagger.json b/docs/swagger.json index 5963aec..1033f09 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -6,7 +6,7 @@ "contact": { "name": "Maintainer Chen Ke", "url": "https://danxi.fduhole.com/about", - "email": "dev@fduhole.com" + "email": "dev@danta.tech" }, "license": { "name": "Apache 2.0", diff --git a/docs/swagger.yaml b/docs/swagger.yaml index b08dc99..bf146e1 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -392,7 +392,7 @@ definitions: host: localhost:8000 info: contact: - email: dev@fduhole.com + email: dev@danta.tech name: Maintainer Chen Ke url: https://danxi.fduhole.com/about description: Next Generation of Auth microservice integrated with kong for registration diff --git a/main.go b/main.go index e3252ef..dfbbd90 100644 --- a/main.go +++ b/main.go @@ -4,7 +4,7 @@ // @contact.name Maintainer Chen Ke // @contact.url https://danxi.fduhole.com/about -// @contact.email dev@fduhole.com +// @contact.email dev@danta.tech // @license.name Apache 2.0 // @license.url https://www.apache.org/licenses/LICENSE-2.0.html diff --git a/utils/validate.go b/utils/validate.go index 5555ad5..7a40e74 100644 --- a/utils/validate.go +++ b/utils/validate.go @@ -37,7 +37,7 @@ func ValidateEmailFudan(email string) error { } emailSplit := strings.Split(email, "@") - const messageSuffix = `如果您的邮箱不满足此规则,可以尝试邮箱别名,或发送您的学邮和情况说明到 dev@fduhole.com ,我们为您手动处理` + const messageSuffix = `如果您的邮箱不满足此规则,可以尝试邮箱别名,或发送您的学邮和情况说明到 dev@danta.tech ,我们为您手动处理` if emailSplit[1] == "fudan.edu.cn" { if year >= 21 {