Class ThirdPartyAppService
java.lang.Object
io.github.xezzon.zeroweb.third_party_app.internal.ThirdPartyAppService
- All Implemented Interfaces:
IThirdPartyAppService4Call
第三方应用服务
提供第三方应用的业务逻辑处理,包括应用管理、密钥管理、JWT签名等功能
- Author:
- xezzon
-
Constructor Summary
ConstructorsConstructorDescriptionThirdPartyAppService(ThirdPartyAppDAO thirdPartyAppDAO, AccessSecretRepository accessSecretRepository, ThirdPartyAppMemberRepository thirdPartyAppMemberRepository, io.github.xezzon.zeroweb.common.config.ZerowebConfig zerowebConfig) 依赖注入 -
Method Summary
-
Constructor Details
-
ThirdPartyAppService
public ThirdPartyAppService(ThirdPartyAppDAO thirdPartyAppDAO, AccessSecretRepository accessSecretRepository, ThirdPartyAppMemberRepository thirdPartyAppMemberRepository, io.github.xezzon.zeroweb.common.config.ZerowebConfig zerowebConfig) 依赖注入- Parameters:
thirdPartyAppDAO- 第三方应用的数据库操作accessSecretRepository- 访问凭据的 JPA 接口thirdPartyAppMemberRepository- 第三方应用成员的 JPA 接口zerowebConfig- JWT 相关设置
-
-
Method Details
-
signJwt
校验摘要并签发JWT
首先验证消息摘要的有效性,然后为第三方应用签发包含认证信息的JWT
- Specified by:
signJwtin interfaceIThirdPartyAppService4Call- Parameters:
accessKey- 访问密钥body- 消息内容signature- 消息摘要iat- 消息签发时间- Returns:
- 签发的JWT字符串
- Throws:
InvalidAccessKeyException- 签名验证未通过时抛出
-