1
zj
2025-08-19 0b10f87268bd511c7d8dddad30060abefa49aab2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package com.ruoyi.im.config;
 
public enum AppAuthConfig {
 
    /**
     * 应用认证配置
     */
    DEFAULT_CONFIG("cd693c66bb6992a7cc2b13379e981d48", "720c0b98f7a3");
 
    private final String appKey;
    private final String appSecret;
 
    AppAuthConfig(String appKey, String appSecret) {
        this.appKey = appKey;
        this.appSecret = appSecret;
    }
 
    public String getAppKey() {
        return appKey;
    }
 
    public String getAppSecret() {
        return appSecret;
    }
 
    /**
     * 根据key查找配置
     * @param key 应用key
     * @return 对应的配置,找不到返回null
     */
    public static AppAuthConfig getByKey(String key) {
        for (AppAuthConfig config : values()) {
            if (config.getAppKey().equals(key)) {
                return config;
            }
        }
        return null;
    }
}