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; } }