2
0

feat: auth support i18n message

This commit is contained in:
zhangsz
2025-01-22 16:31:51 +08:00
parent b7f60a6a08
commit 8e7851eebe
11 changed files with 143 additions and 50 deletions

View File

@@ -2,6 +2,8 @@ package org.wfc.common.core.domain;
import java.io.Serializable;
import org.wfc.common.core.constant.Constants;
import org.wfc.common.core.utils.MessageUtils;
import org.wfc.common.core.utils.StringUtils;
/**
* 响应信息主体
@@ -85,9 +87,18 @@ public class R<T> implements Serializable
public String getMsg()
{
return msg;
String mes = null;
if (!StringUtils.isEmpty(msg)) {
mes = MessageUtils.message(msg);
}
return mes;
}
// public String getMsg()
// {
// return msg;
// }
public void setMsg(String msg)
{
this.msg = msg;

View File

@@ -135,6 +135,24 @@ gateway.internal.server.error=Internal server error
gateway.service.not.found=Service not found
gateway.request.address.forbidden=Request address is not allowed to access
gateway.request.limit=Request limit exceeded, please try again later
## wfc-auth
auth.invalid.login.parameter=Invalid Login Parameter
auth.authentication.type.not.supported=authentication type not supported
auth.is.healthy=Auth is healthy
auth.password.not.in.specified.range=User password not in specified range
auth.username.not.in.specified.range=Username not in specified range
auth.ip.in.blacklist=Sorry, the access IP has been blacklisted by the system
auth.username.not.exists=Login user: {0} does not exist
auth.user.deleted=Sorry, your account{0} has been deleted
auth.user.blocked=Sorry, your account: {0} has been disabled
auth.login.success=Login successful
auth.logout.success=Logout successful
auth.username.must.in.specified.range=Username length must be between 2 and 20 characters
auth.password.must.in.specified.range=Password length must be between 5 and 50 characters
auth.register.success=Register successful
auth.user.registered=The user has been registered
auth.password.retry.limit.count=Password input error {0} times, account locked for {1} minutes
auth.password.retry.limit.exceed=Password input error {0} times
## wfc-common
common.operate.success=Operation successful

View File

@@ -135,6 +135,24 @@ gateway.internal.server.error=Internal server error
gateway.service.not.found=Service not found
gateway.request.address.forbidden=Request address is not allowed to access
gateway.request.limit=Request limit exceeded, please try again later
## wfc-auth
auth.invalid.login.parameter=Invalid Login Parameter
auth.authentication.type.not.supported=authentication type not supported
auth.is.healthy=Auth is healthy
auth.password.not.in.specified.range=User password not in specified range
auth.username.not.in.specified.range=Username not in specified range
auth.ip.in.blacklist=Sorry, the access IP has been blacklisted by the system
auth.username.not.exists=Login user: {0} does not exist
auth.user.deleted=Sorry, your account{0} has been deleted
auth.user.blocked=Sorry, your account: {0} has been disabled
auth.login.success=Login successful
auth.logout.success=Logout successful
auth.username.must.in.specified.range=Username length must be between 2 and 20 characters
auth.password.must.in.specified.range=Password length must be between 5 and 50 characters
auth.register.success=Register successful
auth.user.registered=The user has been registered
auth.password.retry.limit.count=Password input error {0} times, account locked for {1} minutes
auth.password.retry.limit.exceed=Password input error {0} times
## wfc-common
common.operate.success=Operation successful

View File

@@ -136,6 +136,25 @@ gateway.internal.server.error=内部服务器错误
gateway.service.not.found=服务未找到
gateway.request.address.forbidden=请求地址不允许访问
gateway.request.limit=请求超过最大数,请稍候再试
## wfc-auth
auth.invalid.login.parameter=无效的登录参数
auth.authentication.type.not.supported=不支持的认证类型
auth.is.healthy=认证服务健康
auth.password.not.in.specified.range=用户密码不在指定范围
auth.username.not.in.specified.range=用户名不在指定范围
auth.ip.in.blacklist=很遗憾访问IP已被列入系统黑名单
auth.username.not.exists=登录用户:{0} 不存在
auth.user.deleted=对不起,您的账号:{0} 已被删除
auth.user.blocked.contact.admin=用户已停用,请联系管理员
auth.user.blocked=对不起,您的账号:{0} 已停用
auth.login.success=登录成功
auth.logout.success=退出成功
auth.username.must.in.specified.range=账户长度必须在2到20个字符之间
auth.password.must.in.specified.range=密码长度必须在5到20个字符之间
auth.register.success=注册成功
auth.user.registered=用户已存在
auth.password.retry.limit.count=密码输入错误{0}次,帐户锁定{1}分钟
auth.password.retry.limit.exceed=密码输入错误{0}次
## wfc-common
common.operate.success=操作成功