Skip to content

Releases: EasyAbp/WeChatManagement

3.2.0

27 Oct 19:28
197e1be
Compare
Choose a tag to compare

What's Changed

Full Changelog: 3.1.0...3.2.0

3.1.0

30 Jul 13:44
eefa5dc
Compare
Choose a tag to compare

What's Changed

Full Changelog: 3.0.0...3.1.0

3.0.0

14 Apr 21:16
51dcfe0
Compare
Choose a tag to compare

What's Changed

Full Changelog: 2.1.0...3.0.0

2.1.0

13 Jan 06:43
f1568da
Compare
Choose a tag to compare

What's Changed

  • Upgrade to ABP 7.0.0 by @gdlcf88 in #88
  • Upgrade to Abp.WeChat 2.3.0 to share tokens and tickets by @gdlcf88 in #89

Full Changelog: 2.0.1...2.1.0

2.0.0

19 Dec 17:00
a2d7625
Compare
Choose a tag to compare

本次更新也升级了 EasyAbp.WeChat.Abp 模块到 2.0.0 版本,它包含了多项破坏性改动,如果你对此模块有重写、扩展等,也请参考:https://github.com/EasyAbp/Abp.WeChat/releases/tag/2.0.0

主要改动

  1. 由于 EasyAbp.WeChat.Abp 模块移除了 Options resolving 机制,本模块之前提供的 ClaimsWeChatMiniProgramOptionsResolveContributor 等设施已移除。如果你是多 appId 场景,相关的 HTTP API 接口现在一定会提供 appId 的入参(入参可能在路由上)。
  2. WeChatApp 实体的 WeChatComponentId 属性更名为 ComponentWeChatAppId。
  3. WeChatApp 实体的 AppSecret/Token/EncodingAesKey 属性名称增加 Encrypted 前缀,值由明文存储变更为密文存储。升级模块之前,请备份这些配置,并清空它们在数据表中的值,在升级后重新手动将它们重新设置。
  4. WeChatAppUser 实体的 SessionKey 属性更名为 EncryptedSessionKey,由明文存储变更为密文存储。升级模块之前,请清空所有 SessionKey 在数据表中的值。
  5. 引入了新的微信第三方平台管理模块,并提供了相关的回调接口、授权页面、授权管理页面等设施,详见:https://github.com/EasyAbp/Abp.WeChat/releases/tag/2.0.0

What's Changed

New Contributors

Full Changelog: 1.5.0...2.0.0

1.5.0

03 Dec 20:45
8c66b73
Compare
Choose a tag to compare

Breaking Changes

  • LoginInputPcLoginInput 都新增了 Scope 入参,请传入合适的值。例如在 Sample 项目中,可以传入 WeChatManagementSample,如果不指定,访问与 Scope 相关 API 接口时,则 ABP 框架认定当前登录态不拥有操作权限。
  • 为避免 Claim appid 与其他模块或应用设计冲突,修改其名称为 wechat_appid

What's Changed

  • Add the Scope login input and rename the claim from appid to wechat_appid by @gdlcf88 in #59

Full Changelog: 1.4.3...1.5.0

1.4.0

15 Nov 17:13
Compare
Choose a tag to compare

Breaking Changes

由于 ABP 6.0 引入了新的 OpenIddict 授权模块,我们对 OpenIddict 和 IDS4 两个模块做了并存兼容。你需要按照以下步骤从旧版模块中升级。

  1. 安装新的 EasyAbp.WeChatManagement.MiniPrograms.Domain.OpenIddict 模块或 EasyAbp.WeChatManagement.MiniPrograms.Domain.Ids4 模块,代替原 EasyAbp.WeChatManagement.MiniPrograms.Domain 模块。

  2. 在 Web/Host 项目的 appsettings.json 中增加微信登录授权服务器配置:

    {
      "WeChatManagement": {
        "MiniPrograms": {
          "AuthServer": {
            "Authority": "https://localhost:44380",
            "ClientId": "MyProjectName_WeChatMiniProgram",
            "ClientSecret": "1q2w3e*"
          }
        }
      }
    }
  3. 在 OpenIddictDataSeedContributor 中增加新的客户端 Data Seed (你也可以使用 IDS4):

    // WeChat MiniProgram
    var weChatMiniProgramClientId =
        configurationSection["MyProjectName_WeChatMiniProgram:ClientId"];
    
    if (!weChatMiniProgramClientId.IsNullOrWhiteSpace())
    {
        await CreateApplicationAsync(
            name: weChatMiniProgramClientId,
            type: OpenIddictConstants.ClientTypes.Confidential,
            consentType: OpenIddictConstants.ConsentTypes.Implicit,
            displayName: "WeChat Mini-program",
            secret: configurationSection["MyProjectName_WeChatMiniProgram:ClientSecret"] ?? "1q2w3e*",
            grantTypes: new List<string>
            {
                WeChatMiniProgramConsts.GrantType,
                OpenIddictConstants.GrantTypes.RefreshToken
            },
            scopes: commonScopes
        );
    }
  4. 在 OpenIddictDataSeedContributor 中找到

    if (grantType == OpenIddictConstants.GrantTypes.ClientCredentials)
    {
        application.Permissions.Add(OpenIddictConstants.Permissions.GrantTypes.ClientCredentials);
    }

    在下面增加

    if (grantType == WeChatMiniProgramConsts.GrantType)
    {
        application.Permissions.Add($"gt:{WeChatMiniProgramConsts.GrantType}");
    }
  5. 在 DbMigrator 项目的 appsettings.json 中增加:

    {
      "IdentityServer": {
        "Clients": {
          "MyProjectName_WeChatMiniProgram": {
            "ClientId": "MyProjectName_WeChatMiniProgram",
            "ClientSecret": "1q2w3e*"
          }
        }
      }
    }
  6. 运行 DbMigrator 项目,以创建新的授权客户端。

What's Changed

  • 升级到 ABP 6.0.1 并支持 OpenIddict 实现 by @gdlcf88 in #54

Full Changelog: 1.3.5...1.4.0

1.3.3

30 Jun 17:44
1361d6b
Compare
Choose a tag to compare

What's Changed

Full Changelog: 1.3.2...1.3.3

v1.0.0

27 Aug 11:34
Compare
Choose a tag to compare

完成了对“微信应用”的抽象(#7),使其范围不止于小程序,未来还将包括:公众号、企业微信、开放平台。
f70a4523cf83f3200cbff0e9024dd5c

注意:本次更新不平滑

  1. 调整DbContext的引用:
    https://github.com/EasyAbp/WeChatManagement/blob/e4ec04755b3b6c295da14f7a19c1a19be9641573/samples/WeChatManagementSample/aspnet-core/src/WeChatManagementSample.EntityFrameworkCore/EntityFrameworkCore/WeChatManagementSampleDbContext.cs#L78-L79
  2. 在EF的迁移文件手动做调整,参考:
    https://github.com/EasyAbp/WeChatManagement/blob/e4ec04755b3b6c295da14f7a19c1a19be9641573/samples/WeChatManagementSample/aspnet-core/src/WeChatManagementSample.EntityFrameworkCore/Migrations/20210827092621_IntroducedWeChatApp.cs
  3. 注意路由变化:
    • [Route("/api/wechat-management/mini-programs/mini-program")] -> [Route("/api/wechat-management/common/wechat-app")]
    • [Route("/api/wechat-management/mini-programs/mini-program-user")] -> [Route("/api/wechat-management/common/wechat-app-user")]

务必谨慎操作避免丢失数据!