update: add callback config domain
This commit is contained in:
@@ -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;
|
||||
|
||||
48
src/main/java/we/plugin/auth/CallbackConfig.java
Normal file
48
src/main/java/we/plugin/auth/CallbackConfig.java
Normal 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);
|
||||
}
|
||||
}
|
||||
38
src/main/java/we/plugin/auth/Receiver.java
Normal file
38
src/main/java/we/plugin/auth/Receiver.java
Normal 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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user