package com.ruoyi.im.config; public enum AppAuthConfig { /** * 应用认证配置 */ DEFAULT_CONFIG("144706c24be1b1cc44180fb7cf3bca9e", "724286608af7"); 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; } }