@Configuration
@ConditionalOnProperty(value="shenyu.plugins.sign.enabled",
havingValue="true",
matchIfMissing=true)
public class SignPluginConfiguration
extends java.lang.Object
| 构造器和说明 |
|---|
SignPluginConfiguration() |
| 限定符和类型 | 方法和说明 |
|---|---|
org.apache.shenyu.sync.data.api.AuthDataSubscriber |
signAuthDataSubscriber()
Sign auth data subscriber.
|
org.apache.shenyu.plugin.api.ShenyuPlugin |
signPlugin(org.apache.shenyu.plugin.sign.service.SignService signService,
org.springframework.http.codec.ServerCodecConfigurer configurer)
sign plugin.
|
org.apache.shenyu.plugin.base.handler.PluginDataHandler |
signPluginDataHandler()
sign plugin data handler.
|
org.apache.shenyu.plugin.sign.service.SignService |
signService(int delay,
java.lang.String aesKey,
java.lang.String aesIv)
Sign service.
|
@Bean
@ConditionalOnMissingBean(value=org.apache.shenyu.plugin.sign.service.SignService.class,
search=ALL)
public org.apache.shenyu.plugin.sign.service.SignService signService(@Value(value="${shenyu.sign.delay:5}")
int delay,
@Value(value="${shenyu.aes.secret.key:}")
java.lang.String aesKey,
@Value(value="${shenyu.aes.secret.iv:}")
java.lang.String aesIv)
Uses RoutingExtractor and RoutingSignProvider to support multiple sign strategies: ability (x-sg-* headers), pms (appid/sign headers), wechat (query params SHA1), and API body (HEAD JSON parsing).
CustomSignService wraps the standard ComposableSignService and adds special handling for API body signature verification (/rest/api/ paths).
delay - the sign request timeout delay in minutes from configurationaesKey - the AES key for appSecret decryption from configurationaesIv - the AES IV for appSecret decryption from configuration@Bean
public org.apache.shenyu.plugin.api.ShenyuPlugin signPlugin(org.apache.shenyu.plugin.sign.service.SignService signService,
org.springframework.http.codec.ServerCodecConfigurer configurer)
configurer - the spring server codec configsignService - the sign service@Bean public org.apache.shenyu.sync.data.api.AuthDataSubscriber signAuthDataSubscriber()
@Bean public org.apache.shenyu.plugin.base.handler.PluginDataHandler signPluginDataHandler()
Copyright © 2026 The Apache Software Foundation. All rights reserved.