update: add callback config domain

This commit is contained in:
hongqiaowei
2021-01-27 14:39:52 +08:00
parent 78d1a0ad7b
commit e3e3eb43b5
3 changed files with 90 additions and 1 deletions

View File

@@ -43,6 +43,7 @@ public class ApiConfig {
static final byte SERVICE_ARRANGE = 1;
static final byte SERVICE_DISCOVERY = 2;
static final byte REVERSE_PROXY = 3;
static final byte CALLBACK = 4;
}
public static final int DELETED = 1;
@@ -88,7 +89,9 @@ public class ApiConfig {
public List<PluginConfig> pluginConfigs;
public boolean checkApp = false;
public boolean checkApp = false;
public CallbackConfig callbackConfig;
public static boolean isAntPathPattern(String path) {
boolean uriVar = false;

View File

@@ -0,0 +1,48 @@
/*
* Copyright (C) 2020 the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package we.plugin.auth;
import we.util.JacksonUtils;
import java.util.List;
/**
* @author hongqiaowei
*/
public class CallbackConfig {
public static final char ASYNC = 'a';
public static final char SYNC = 's';
public int id;
public char type;
public List<Receiver> receivers;
public String respHeaders;
public String respBody;
@Override
public String toString() {
return JacksonUtils.writeValueAsString(this);
}
}

View File

@@ -0,0 +1,38 @@
/*
* Copyright (C) 2020 the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package we.plugin.auth;
import we.util.JacksonUtils;
/**
* @author hongqiaowei
*/
public class Receiver {
public String service;
public int type;
public String path;
@Override
public String toString() {
return JacksonUtils.writeValueAsString(this);
}
}