Browse Source

Add localized texts.

pull/12084/head
maliming 4 years ago
parent
commit
b195d485b1
No known key found for this signature in database GPG Key ID: 96224957E51C89E
  1. 25
      modules/OpenIddict/src/Volo.Abp.OpenIddict.AspNetCore/Volo/Abp/OpenIddict/Controllers/AuthorizeController.cs
  2. 14
      modules/OpenIddict/src/Volo.Abp.OpenIddict.AspNetCore/Volo/Abp/OpenIddict/Controllers/OpenIdDictControllerBase.cs
  3. 4
      modules/OpenIddict/src/Volo.Abp.OpenIddict.AspNetCore/Volo/Abp/OpenIddict/Controllers/TokenController.AuthorizationCode.cs
  4. 2
      modules/OpenIddict/src/Volo.Abp.OpenIddict.AspNetCore/Volo/Abp/OpenIddict/Controllers/TokenController.ClientCredentials.cs
  5. 4
      modules/OpenIddict/src/Volo.Abp.OpenIddict.AspNetCore/Volo/Abp/OpenIddict/Controllers/TokenController.DeviceCode.cs
  6. 4
      modules/OpenIddict/src/Volo.Abp.OpenIddict.AspNetCore/Volo/Abp/OpenIddict/Controllers/TokenController.RefreshToken.cs
  7. 13
      modules/OpenIddict/src/Volo.Abp.OpenIddict.AspNetCore/Volo/Abp/OpenIddict/Controllers/TokenController.cs
  8. 2
      modules/OpenIddict/src/Volo.Abp.OpenIddict.AspNetCore/Volo/Abp/OpenIddict/Controllers/UserInfoController.cs
  9. 8
      modules/OpenIddict/src/Volo.Abp.OpenIddict.AspNetCore/Volo/Abp/OpenIddict/Views/Authorize/Authorize.cshtml
  10. 6
      modules/OpenIddict/src/Volo.Abp.OpenIddict.AspNetCore/Volo/Abp/OpenIddict/Views/Logout/Logout.cshtml
  11. 7
      modules/OpenIddict/src/Volo.Abp.OpenIddict.Domain.Shared/Volo.Abp.OpenIddict.Domain.Shared.csproj
  12. 13
      modules/OpenIddict/src/Volo.Abp.OpenIddict.Domain.Shared/Volo/Abp/OpenIddict/Localization/OpenIddict/en.json
  13. 23
      modules/OpenIddict/src/Volo.Abp.OpenIddict.Domain.Shared/Volo/Abp/OpenIddict/Localization/OpenIddict/zh-Hans.json
  14. 15
      modules/OpenIddict/src/Volo.Abp.OpenIddict.Domain.Shared/Volo/Abp/OpenIddict/Localization/OpenIddict/zh-Hant.json
  15. 2
      modules/OpenIddict/src/Volo.Abp.OpenIddict.Domain/Volo/Abp/OpenIddict/AbpOpenIddictDomainModule.cs
  16. 12
      nupkg/common.ps1

25
modules/OpenIddict/src/Volo.Abp.OpenIddict.AspNetCore/Volo/Abp/OpenIddict/Controllers/AuthorizeController.cs

@ -22,8 +22,7 @@ public class AuthorizeController : OpenIdDictControllerBase
[IgnoreAntiforgeryToken] [IgnoreAntiforgeryToken]
public virtual async Task<IActionResult> HandleAsync() public virtual async Task<IActionResult> HandleAsync()
{ {
var request = HttpContext.GetOpenIddictServerRequest() ?? var request = await GetOpenIddictServerRequest(HttpContext);
throw new InvalidOperationException("The OpenID Connect request cannot be retrieved.");
// If prompt=login was specified by the client application, // If prompt=login was specified by the client application,
// immediately return the user agent to the login page. // immediately return the user agent to the login page.
@ -63,7 +62,7 @@ public class AuthorizeController : OpenIdDictControllerBase
properties: new AuthenticationProperties(new Dictionary<string, string> properties: new AuthenticationProperties(new Dictionary<string, string>
{ {
[OpenIddictServerAspNetCoreConstants.Properties.Error] = OpenIddictConstants.Errors.LoginRequired, [OpenIddictServerAspNetCoreConstants.Properties.Error] = OpenIddictConstants.Errors.LoginRequired,
[OpenIddictServerAspNetCoreConstants.Properties.ErrorDescription] = "The user is not logged in." [OpenIddictServerAspNetCoreConstants.Properties.ErrorDescription] = L["TheUserIsNotLoggedIn"]
})); }));
} }
@ -78,11 +77,11 @@ public class AuthorizeController : OpenIdDictControllerBase
// Retrieve the profile of the logged in user. // Retrieve the profile of the logged in user.
var user = await UserManager.GetUserAsync(result.Principal) ?? var user = await UserManager.GetUserAsync(result.Principal) ??
throw new InvalidOperationException("The user details cannot be retrieved."); throw new InvalidOperationException(L["TheUserDetailsCannotBbeRetrieved"]);
// Retrieve the application details from the database. // Retrieve the application details from the database.
var application = await ApplicationManager.FindByClientIdAsync(request.ClientId) ?? var application = await ApplicationManager.FindByClientIdAsync(request.ClientId) ??
throw new InvalidOperationException("Details concerning the calling client application cannot be found."); throw new InvalidOperationException(L["DetailsConcerningTheCallingClientApplicationCannotBeFound"]);
// Retrieve the permanent authorizations associated with the user and the calling client application. // Retrieve the permanent authorizations associated with the user and the calling client application.
var authorizations = await AuthorizationManager.FindAsync( var authorizations = await AuthorizationManager.FindAsync(
@ -102,8 +101,7 @@ public class AuthorizeController : OpenIdDictControllerBase
properties: new AuthenticationProperties(new Dictionary<string, string> properties: new AuthenticationProperties(new Dictionary<string, string>
{ {
[OpenIddictServerAspNetCoreConstants.Properties.Error] = OpenIddictConstants.Errors.ConsentRequired, [OpenIddictServerAspNetCoreConstants.Properties.Error] = OpenIddictConstants.Errors.ConsentRequired,
[OpenIddictServerAspNetCoreConstants.Properties.ErrorDescription] = [OpenIddictServerAspNetCoreConstants.Properties.ErrorDescription] = L["TheLoggedInUserIsNotAllowedToAccessThisClientApplication"]
"The logged in user is not allowed to access this client application."
})); }));
// If the consent is implicit or if an authorization was found, // If the consent is implicit or if an authorization was found,
@ -150,8 +148,7 @@ public class AuthorizeController : OpenIdDictControllerBase
properties: new AuthenticationProperties(new Dictionary<string, string> properties: new AuthenticationProperties(new Dictionary<string, string>
{ {
[OpenIddictServerAspNetCoreConstants.Properties.Error] = OpenIddictConstants.Errors.ConsentRequired, [OpenIddictServerAspNetCoreConstants.Properties.Error] = OpenIddictConstants.Errors.ConsentRequired,
[OpenIddictServerAspNetCoreConstants.Properties.ErrorDescription] = [OpenIddictServerAspNetCoreConstants.Properties.ErrorDescription] = L["InteractiveUserConsentIsRequired"]
"Interactive user consent is required."
})); }));
// In every other case, render the consent form. // In every other case, render the consent form.
@ -168,16 +165,15 @@ public class AuthorizeController : OpenIdDictControllerBase
[Authorize, AbpFormValueRequired("submit.Accept")] [Authorize, AbpFormValueRequired("submit.Accept")]
public virtual async Task<IActionResult> HandleAcceptConsentAsync() public virtual async Task<IActionResult> HandleAcceptConsentAsync()
{ {
var request = HttpContext.GetOpenIddictServerRequest() ?? var request = await GetOpenIddictServerRequest(HttpContext);
throw new InvalidOperationException("The OpenID Connect request cannot be retrieved.");
// Retrieve the profile of the logged in user. // Retrieve the profile of the logged in user.
var user = await UserManager.GetUserAsync(User) ?? var user = await UserManager.GetUserAsync(User) ??
throw new InvalidOperationException("The user details cannot be retrieved."); throw new InvalidOperationException(L["TheUserDetailsCannotBbeRetrieved"]);
// Retrieve the application details from the database. // Retrieve the application details from the database.
var application = await ApplicationManager.FindByClientIdAsync(request.ClientId) ?? var application = await ApplicationManager.FindByClientIdAsync(request.ClientId) ??
throw new InvalidOperationException("Details concerning the calling client application cannot be found."); throw new InvalidOperationException(L["DetailsConcerningTheCallingClientApplicationCannotBeFound"]);
// Retrieve the permanent authorizations associated with the user and the calling client application. // Retrieve the permanent authorizations associated with the user and the calling client application.
var authorizations = await AuthorizationManager.FindAsync( var authorizations = await AuthorizationManager.FindAsync(
@ -197,8 +193,7 @@ public class AuthorizeController : OpenIdDictControllerBase
properties: new AuthenticationProperties(new Dictionary<string, string> properties: new AuthenticationProperties(new Dictionary<string, string>
{ {
[OpenIddictServerAspNetCoreConstants.Properties.Error] = OpenIddictConstants.Errors.ConsentRequired, [OpenIddictServerAspNetCoreConstants.Properties.Error] = OpenIddictConstants.Errors.ConsentRequired,
[OpenIddictServerAspNetCoreConstants.Properties.ErrorDescription] = [OpenIddictServerAspNetCoreConstants.Properties.ErrorDescription] = L["TheLoggedInUserIsNotAllowedToAccessThisClientApplication"]
"The logged in user is not allowed to access this client application."
})); }));
} }

14
modules/OpenIddict/src/Volo.Abp.OpenIddict.AspNetCore/Volo/Abp/OpenIddict/Controllers/OpenIdDictControllerBase.cs

@ -1,8 +1,11 @@
using System.Collections.Generic; using System;
using System.Collections.Generic;
using System.Collections.Immutable; using System.Collections.Immutable;
using System.Linq; using System.Linq;
using System.Security.Claims; using System.Security.Claims;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Identity; using Microsoft.AspNetCore.Identity;
using OpenIddict.Abstractions; using OpenIddict.Abstractions;
using Volo.Abp.AspNetCore.Mvc; using Volo.Abp.AspNetCore.Mvc;
@ -27,6 +30,15 @@ public abstract class OpenIdDictControllerBase : AbpController
LocalizationResource = typeof(AbpOpenIddictResource); LocalizationResource = typeof(AbpOpenIddictResource);
} }
protected virtual Task<OpenIddictRequest> GetOpenIddictServerRequest(HttpContext httpContext)
{
var request = HttpContext.GetOpenIddictServerRequest() ??
throw new InvalidOperationException(L["TheOpenIDConnectRequestCannotBeRetrieved"]);
return Task.FromResult(request);
}
protected virtual async Task<IEnumerable<string>> GetResourcesAsync(ImmutableArray<string> scopes) protected virtual async Task<IEnumerable<string>> GetResourcesAsync(ImmutableArray<string> scopes)
{ {
var resources = new List<string>(); var resources = new List<string>();

4
modules/OpenIddict/src/Volo.Abp.OpenIddict.AspNetCore/Volo/Abp/OpenIddict/Controllers/TokenController.AuthorizationCode.cs

@ -26,7 +26,7 @@ public partial class TokenController
properties: new AuthenticationProperties(new Dictionary<string, string> properties: new AuthenticationProperties(new Dictionary<string, string>
{ {
[OpenIddictServerAspNetCoreConstants.Properties.Error] = OpenIddictConstants.Errors.InvalidGrant, [OpenIddictServerAspNetCoreConstants.Properties.Error] = OpenIddictConstants.Errors.InvalidGrant,
[OpenIddictServerAspNetCoreConstants.Properties.ErrorDescription] = "The token is no longer valid." [OpenIddictServerAspNetCoreConstants.Properties.ErrorDescription] = L["TheTokenIsNoLongerValid"]
})); }));
} }
@ -38,7 +38,7 @@ public partial class TokenController
properties: new AuthenticationProperties(new Dictionary<string, string> properties: new AuthenticationProperties(new Dictionary<string, string>
{ {
[OpenIddictServerAspNetCoreConstants.Properties.Error] = OpenIddictConstants.Errors.InvalidGrant, [OpenIddictServerAspNetCoreConstants.Properties.Error] = OpenIddictConstants.Errors.InvalidGrant,
[OpenIddictServerAspNetCoreConstants.Properties.ErrorDescription] = "The user is no longer allowed to sign in." [OpenIddictServerAspNetCoreConstants.Properties.ErrorDescription] = L["TheUserIsNoLongerAllowedToSignIn"]
})); }));
} }

2
modules/OpenIddict/src/Volo.Abp.OpenIddict.AspNetCore/Volo/Abp/OpenIddict/Controllers/TokenController.ClientCredentials.cs

@ -19,7 +19,7 @@ public partial class TokenController
var application = await ApplicationManager.FindByClientIdAsync(request.ClientId); var application = await ApplicationManager.FindByClientIdAsync(request.ClientId);
if (application == null) if (application == null)
{ {
throw new InvalidOperationException("The application details cannot be found in the database."); throw new InvalidOperationException(L["TheApplicationDetailsCannotBeFound"]);
} }
// Create a new ClaimsIdentity containing the claims that // Create a new ClaimsIdentity containing the claims that

4
modules/OpenIddict/src/Volo.Abp.OpenIddict.AspNetCore/Volo/Abp/OpenIddict/Controllers/TokenController.DeviceCode.cs

@ -26,7 +26,7 @@ public partial class TokenController
properties: new AuthenticationProperties(new Dictionary<string, string> properties: new AuthenticationProperties(new Dictionary<string, string>
{ {
[OpenIddictServerAspNetCoreConstants.Properties.Error] = OpenIddictConstants.Errors.InvalidGrant, [OpenIddictServerAspNetCoreConstants.Properties.Error] = OpenIddictConstants.Errors.InvalidGrant,
[OpenIddictServerAspNetCoreConstants.Properties.ErrorDescription] = "The token is no longer valid." [OpenIddictServerAspNetCoreConstants.Properties.ErrorDescription] = L["TheTokenIsNoLongerValid"]
})); }));
} }
@ -38,7 +38,7 @@ public partial class TokenController
properties: new AuthenticationProperties(new Dictionary<string, string> properties: new AuthenticationProperties(new Dictionary<string, string>
{ {
[OpenIddictServerAspNetCoreConstants.Properties.Error] = OpenIddictConstants.Errors.InvalidGrant, [OpenIddictServerAspNetCoreConstants.Properties.Error] = OpenIddictConstants.Errors.InvalidGrant,
[OpenIddictServerAspNetCoreConstants.Properties.ErrorDescription] = "The user is no longer allowed to sign in." [OpenIddictServerAspNetCoreConstants.Properties.ErrorDescription] = L["TheUserIsNoLongerAllowedToSignIn"]
})); }));
} }

4
modules/OpenIddict/src/Volo.Abp.OpenIddict.AspNetCore/Volo/Abp/OpenIddict/Controllers/TokenController.RefreshToken.cs

@ -26,7 +26,7 @@ public partial class TokenController
properties: new AuthenticationProperties(new Dictionary<string, string> properties: new AuthenticationProperties(new Dictionary<string, string>
{ {
[OpenIddictServerAspNetCoreConstants.Properties.Error] = OpenIddictConstants.Errors.InvalidGrant, [OpenIddictServerAspNetCoreConstants.Properties.Error] = OpenIddictConstants.Errors.InvalidGrant,
[OpenIddictServerAspNetCoreConstants.Properties.ErrorDescription] = "The token is no longer valid." [OpenIddictServerAspNetCoreConstants.Properties.ErrorDescription] = L["TheTokenIsNoLongerValid"]
})); }));
} }
@ -38,7 +38,7 @@ public partial class TokenController
properties: new AuthenticationProperties(new Dictionary<string, string> properties: new AuthenticationProperties(new Dictionary<string, string>
{ {
[OpenIddictServerAspNetCoreConstants.Properties.Error] = OpenIddictConstants.Errors.InvalidGrant, [OpenIddictServerAspNetCoreConstants.Properties.Error] = OpenIddictConstants.Errors.InvalidGrant,
[OpenIddictServerAspNetCoreConstants.Properties.ErrorDescription] = "The user is no longer allowed to sign in." [OpenIddictServerAspNetCoreConstants.Properties.ErrorDescription] = L["TheUserIsNoLongerAllowedToSignIn"]
})); }));
} }

13
modules/OpenIddict/src/Volo.Abp.OpenIddict.AspNetCore/Volo/Abp/OpenIddict/Controllers/TokenController.cs

@ -12,9 +12,7 @@ public partial class TokenController : OpenIdDictControllerBase
[HttpGet, HttpPost, Produces("application/json")] [HttpGet, HttpPost, Produces("application/json")]
public virtual async Task<IActionResult> HandleAsync() public virtual async Task<IActionResult> HandleAsync()
{ {
var request = HttpContext.GetOpenIddictServerRequest() ?? var request = await GetOpenIddictServerRequest(HttpContext);
//TODO: L
throw new InvalidOperationException("The OpenID Connect request cannot be retrieved.");
if (request.IsPasswordGrantType()) if (request.IsPasswordGrantType())
{ {
@ -25,23 +23,22 @@ public partial class TokenController : OpenIdDictControllerBase
{ {
return await HandleAuthorizationCodeAsync(request); return await HandleAuthorizationCodeAsync(request);
} }
if (request.IsRefreshTokenGrantType() ) if (request.IsRefreshTokenGrantType() )
{ {
return await HandleRefreshTokenAsync(request); return await HandleRefreshTokenAsync(request);
} }
if (request.IsDeviceCodeGrantType() ) if (request.IsDeviceCodeGrantType() )
{ {
return await HandleDeviceCodeAsync(request); return await HandleDeviceCodeAsync(request);
} }
if (request.IsClientCredentialsGrantType()) if (request.IsClientCredentialsGrantType())
{ {
return await HandleClientCredentialsAsync(request); return await HandleClientCredentialsAsync(request);
} }
//TODO: L throw new AbpException(string.Format(L["TheSpecifiedGrantTypeIsNotImplemented"], request.GrantType));
throw new NotImplementedException("The specified grant type is not implemented.");
} }
} }

2
modules/OpenIddict/src/Volo.Abp.OpenIddict.AspNetCore/Volo/Abp/OpenIddict/Controllers/UserInfoController.cs

@ -28,7 +28,7 @@ public class UserInfoController : OpenIdDictControllerBase
properties: new AuthenticationProperties(new Dictionary<string, string> properties: new AuthenticationProperties(new Dictionary<string, string>
{ {
[OpenIddictServerAspNetCoreConstants.Properties.Error] = OpenIddictConstants.Errors.InvalidToken, [OpenIddictServerAspNetCoreConstants.Properties.Error] = OpenIddictConstants.Errors.InvalidToken,
[OpenIddictServerAspNetCoreConstants.Properties.ErrorDescription] = "The specified access token is bound to an account that no longer exists." //TODO: L [OpenIddictServerAspNetCoreConstants.Properties.ErrorDescription] = L["TheSpecifiedAccessTokenIsBoundToAnAccountThatNoLongerExists"]
})); }));
} }

8
modules/OpenIddict/src/Volo.Abp.OpenIddict.AspNetCore/Volo/Abp/OpenIddict/Views/Authorize/Authorize.cshtml

@ -1,5 +1,9 @@
@using Microsoft.Extensions.Primitives @using Microsoft.Extensions.Primitives
@using Microsoft.Extensions.Localization
@using Volo.Abp.OpenIddict.Localization
@model AuthorizeViewModel @model AuthorizeViewModel
@inject IStringLocalizer<AbpOpenIddictResource> L
<div class="jumbotron"> <div class="jumbotron">
<h1>Authorization</h1> <h1>Authorization</h1>
<p class="lead text-left">Do you want to grant <strong>@Model.ApplicationName</strong> access to your data? (scopes requested: @Model.Scope)</p> <p class="lead text-left">Do you want to grant <strong>@Model.ApplicationName</strong> access to your data? (scopes requested: @Model.Scope)</p>
@ -12,7 +16,7 @@
<input type="hidden" name="@parameter.Key" value="@parameter.Value"/> <input type="hidden" name="@parameter.Key" value="@parameter.Value"/>
} }
<input class="btn btn-lg btn-success" name="submit.Accept" type="submit" value="Yes"/> <input class="btn btn-lg btn-success" name="submit.Accept" type="submit" value="@L["Yes"]"/>
<input class="btn btn-lg btn-danger" name="submit.Deny" type="submit" value="No"/> <input class="btn btn-lg btn-danger" name="submit.Deny" type="submit" value="@L["No"]"/>
</form> </form>
</div> </div>

6
modules/OpenIddict/src/Volo.Abp.OpenIddict.AspNetCore/Volo/Abp/OpenIddict/Views/Logout/Logout.cshtml

@ -1,4 +1,8 @@
@using Microsoft.Extensions.Primitives @using Microsoft.Extensions.Primitives
@using Microsoft.Extensions.Localization
@using Volo.Abp.OpenIddict.Localization
@model AuthorizeViewModel
@inject IStringLocalizer<AbpOpenIddictResource> L
<div class="jumbotron"> <div class="jumbotron">
<h1>Log out</h1> <h1>Log out</h1>
@ -12,6 +16,6 @@
<input type="hidden" name="@parameter.Key" value="@parameter.Value"/> <input type="hidden" name="@parameter.Key" value="@parameter.Value"/>
} }
<input class="btn btn-lg btn-success" name="Confirm" type="submit" value="Yes"/> <input class="btn btn-lg btn-success" name="Confirm" type="submit" value="@L["Yes"]"/>
</form> </form>
</div> </div>

7
modules/OpenIddict/src/Volo.Abp.OpenIddict.Domain.Shared/Volo.Abp.OpenIddict.Domain.Shared.csproj

@ -18,11 +18,8 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<EmbeddedResource Include="Localization\OpenIddict\*.json" /> <EmbeddedResource Include="Volo\Abp\OpenIddict\Localization\OpenIddict\*.json" />
<Content Remove="Localization\OpenIddict\*.json" /> <Content Remove="Volo\Abp\OpenIddict\Localization\OpenIddict\*.json" />
<EmbeddedResource Include="Volo\Abp\OpenIddict\Localization\OpenIddict\en.json" />
<EmbeddedResource Include="Volo\Abp\OpenIddict\Localization\OpenIddict\zh-Hans.json" />
<EmbeddedResource Include="Volo\Abp\OpenIddict\Localization\OpenIddict\zh-Hant.json" />
</ItemGroup> </ItemGroup>
</Project> </Project>

13
modules/OpenIddict/src/Volo.Abp.OpenIddict.Domain.Shared/Volo/Abp/OpenIddict/Localization/OpenIddict/en.json

@ -6,6 +6,17 @@
"LoginIsNotAllowed": "You are not allowed to login! Your account is inactive or needs to confirm your email/phone number.", "LoginIsNotAllowed": "You are not allowed to login! Your account is inactive or needs to confirm your email/phone number.",
"InvalidUsername": "Invalid username or password!", "InvalidUsername": "Invalid username or password!",
"InvalidAuthenticatorCode": "Invalid authenticator code!", "InvalidAuthenticatorCode": "Invalid authenticator code!",
"TheTargetUserIsNotLinkedToYou": "The target user is not linked to you!" "TheTargetUserIsNotLinkedToYou": "The target user is not linked to you!",
"TheOpenIDConnectRequestCannotBeRetrieved": "The OpenID Connect request cannot be retrieved.",
"TheUserDetailsCannotBbeRetrieved" : "The user details cannot be retrieved.",
"TheApplicationDetailsCannotBeFound": "The application details cannot be found.",
"DetailsConcerningTheCallingClientApplicationCannotBeFound": "Details concerning the calling client application cannot be found.",
"TheSpecifiedGrantTypeIsNotImplemented.": "The specified grant type {0} is not implemented.",
"TheUserIsNotLoggedIn": "The user is not logged in.",
"TheLoggedInUserIsNotAllowedToAccessThisClientApplication": "The logged in user is not allowed to access this client application.",
"TheTokenIsNoLongerValid": "The token is no longer valid.",
"InteractiveUserConsentIsRequired": "Interactive user consent is required.",
"TheUserIsNoLongerAllowedToSignIn": "The user is no longer allowed to sign in.",
"TheSpecifiedAccessTokenIsBoundToAnAccountThatNoLongerExists": "The specified access token is bound to an account that no longer exists."
} }
} }

23
modules/OpenIddict/src/Volo.Abp.OpenIddict.Domain.Shared/Volo/Abp/OpenIddict/Localization/OpenIddict/zh-Hans.json

@ -1,11 +1,22 @@
{ {
"culture": "zh-Hans", "culture": "zh-Hans",
"texts": { "texts": {
"UserLockedOut": "登录失败,用户账户已被锁定.请稍后再试.", "UserLockedOut": "登錄失敗,用戶賬戶已被鎖定.請稍後再試.",
"InvalidUserNameOrPassword": "用户名或密码错误!", "InvalidUserNameOrPassword": "用戶名或密碼錯誤!",
"LoginIsNotAllowed": "无法登录!你的账号未激活或者需要验证邮箱地址/手机号.", "LoginIsNotAllowed": "無法登錄!妳的賬號未激活或者需要驗證郵箱地址/手機號.",
"InvalidUsername": "用户名或密码错误!", "InvalidUsername": "用戶名或密碼錯誤!",
"InvalidAuthenticatorCode": "验证码无效!", "InvalidAuthenticatorCode": "驗證碼無效!",
"TheTargetUserIsNotLinkedToYou": "目标用户未和你有关联!" "TheTargetUserIsNotLinkedToYou": "目標用戶未和妳有關聯!",
"TheOpenIDConnectRequestCannotBeRetrieved": "無法檢索 OpenID Connect 請求.",
"TheUserDetailsCannotBbeRetrieved" : "無法檢索用戶詳細信息.",
"TheApplicationDetailsCannotBeFound": "找不到應用詳情.",
"DetailsConcerningTheCallingClientApplicationCannotBeFound": "找不到有關調用客戶端應用程序的詳細信息.",
"TheSpecifiedGrantTypeIsNotImplemented.": "未實施指定的授權類型 {0}.",
"TheUserIsNotLoggedIn": "用戶未登錄.",
"TheLoggedInUserIsNotAllowedToAccessThisClientApplication": "登錄的用戶不允許訪問此客戶端應用程序.",
"TheTokenIsNoLongerValid": "令牌不再有效.",
"InteractiveUserConsentIsRequired": "需要交互式用戶同意.",
"TheUserIsNoLongerAllowedToSignIn": "不再允許用戶登錄.",
"TheSpecifiedAccessTokenIsBoundToAnAccountThatNoLongerExists": "指定的訪問令牌綁定到不再存在的帳戶."
} }
} }

15
modules/OpenIddict/src/Volo.Abp.OpenIddict.Domain.Shared/Volo/Abp/OpenIddict/Localization/OpenIddict/zh-Hant.json

@ -6,6 +6,17 @@
"LoginIsNotAllowed": "無法登入!你的賬號未激活或者需要驗證郵箱地址/手機號碼.", "LoginIsNotAllowed": "無法登入!你的賬號未激活或者需要驗證郵箱地址/手機號碼.",
"InvalidUsername": "用戶名或密碼錯誤!", "InvalidUsername": "用戶名或密碼錯誤!",
"InvalidAuthenticatorCode": "驗證碼無效!", "InvalidAuthenticatorCode": "驗證碼無效!",
"TheTargetUserIsNotLinkedToYou": "目標用戶與您無關!" "TheTargetUserIsNotLinkedToYou": "目標用戶與您無關!",
"TheOpenIDConnectRequestCannotBeRetrieved": "无法检索 OpenID Connect 请求.",
"TheUserDetailsCannotBbeRetrieved" : "无法检索用户详细信息.",
"TheApplicationDetailsCannotBeFound": "找不到应用详情.",
"DetailsConcerningTheCallingClientApplicationCannotBeFound": "找不到有关调用客户端应用程序的详细信息.",
"TheSpecifiedGrantTypeIsNotImplemented.": "未实施指定的授权类型 {0}.",
"TheUserIsNotLoggedIn": "用户未登录.",
"TheLoggedInUserIsNotAllowedToAccessThisClientApplication": "登录的用户不允许访问此客户端应用程序.",
"TheTokenIsNoLongerValid": "令牌不再有效.",
"InteractiveUserConsentIsRequired": "需要交互式用户同意.",
"TheUserIsNoLongerAllowedToSignIn": "不再允许用户登录.",
"TheSpecifiedAccessTokenIsBoundToAnAccountThatNoLongerExists": "指定的访问令牌绑定到不再存在的帐户."
} }
} }

2
modules/OpenIddict/src/Volo.Abp.OpenIddict.Domain/Volo/Abp/OpenIddict/AbpOpenIddictDomainModule.cs

@ -34,8 +34,8 @@ public class AbpOpenIddictDomainModule : AbpModule
AbpClaimTypes.UserId = OpenIddictConstants.Claims.Subject; AbpClaimTypes.UserId = OpenIddictConstants.Claims.Subject;
AbpClaimTypes.Role = OpenIddictConstants.Claims.Role; AbpClaimTypes.Role = OpenIddictConstants.Claims.Role;
AbpClaimTypes.UserName = OpenIddictConstants.Claims.Name; AbpClaimTypes.UserName = OpenIddictConstants.Claims.Name;
AbpClaimTypes.SurName = OpenIddictConstants.Claims.FamilyName;
AbpClaimTypes.Name = OpenIddictConstants.Claims.GivenName; AbpClaimTypes.Name = OpenIddictConstants.Claims.GivenName;
AbpClaimTypes.SurName = OpenIddictConstants.Claims.FamilyName;
AbpClaimTypes.PhoneNumber = OpenIddictConstants.Claims.PhoneNumber; AbpClaimTypes.PhoneNumber = OpenIddictConstants.Claims.PhoneNumber;
AbpClaimTypes.PhoneNumberVerified = OpenIddictConstants.Claims.PhoneNumberVerified; AbpClaimTypes.PhoneNumberVerified = OpenIddictConstants.Claims.PhoneNumberVerified;
AbpClaimTypes.Email = OpenIddictConstants.Claims.Email; AbpClaimTypes.Email = OpenIddictConstants.Claims.Email;

12
nupkg/common.ps1

@ -340,12 +340,12 @@ $projects = (
"modules/identityserver/src/Volo.Abp.IdentityServer.Installer", "modules/identityserver/src/Volo.Abp.IdentityServer.Installer",
"studio/source-codes/Volo.Abp.IdentityServer.SourceCode", "studio/source-codes/Volo.Abp.IdentityServer.SourceCode",
# modules/OpenIddict # modules/openiddict
"modules/OpenIddict/src/Volo.Abp.OpenIddict.Domain", "modules/openiddict/src/Volo.Abp.OpenIddict.AspNetCore",
"modules/OpenIddict/src/Volo.Abp.OpenIddict.Domain.Shared", "modules/openiddict/src/Volo.Abp.OpenIddict.Domain",
"modules/OpenIddict/src/Volo.Abp.OpenIddict.EntityFrameworkCore", "modules/openiddict/src/Volo.Abp.OpenIddict.Domain.Shared",
"modules/OpenIddict/src/Volo.Abp.OpenIddict.MongoDB", "modules/openiddict/src/Volo.Abp.OpenIddict.EntityFrameworkCore",
"modules/openiddict/src/Volo.Abp.OpenIddict.MongoDB",
# modules/permission-management # modules/permission-management
"modules/permission-management/src/Volo.Abp.PermissionManagement.Application.Contracts", "modules/permission-management/src/Volo.Abp.PermissionManagement.Application.Contracts",

Loading…
Cancel
Save