org.apache.qpid
qpid-client
diff --git a/src/main/java/io/jboot/component/jwt/JwtConfig.java b/src/main/java/io/jboot/component/jwt/JwtConfig.java
deleted file mode 100644
index caefaf4c85e888f34f4d84d747fe186be337647a..0000000000000000000000000000000000000000
--- a/src/main/java/io/jboot/component/jwt/JwtConfig.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/**
- * Copyright (c) 2015-2018, Michael Yang 杨福海 (fuhai999@gmail.com).
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package io.jboot.component.jwt;
-
-import io.jboot.config.annotation.PropertyConfig;
-import io.jboot.utils.StringUtils;
-
-/**
- * @author Michael Yang 杨福海 (fuhai999@gmail.com)
- * @version V1.0
- * @Package io.jboot.web.jwt
- */
-@PropertyConfig(prefix = "jboot.web.jwt")
-public class JwtConfig {
-
- private String httpHeaderName = "Jwt";
- private String secret;
- private long validityPeriod = 0;
- private String jwtShiroBridge;
-
- public String getHttpHeaderName() {
- return httpHeaderName;
- }
-
- public void setHttpHeaderName(String httpHeaderName) {
- this.httpHeaderName = httpHeaderName;
- }
-
- public String getSecret() {
- return secret;
- }
-
- public void setSecret(String secret) {
- this.secret = secret;
- }
-
- public long getValidityPeriod() {
- return validityPeriod;
- }
-
- public void setValidityPeriod(long validityPeriod) {
- this.validityPeriod = validityPeriod;
- }
-
- public boolean isEnable() {
- return StringUtils.isNotBlank(secret);
- }
-
- public String getJwtShiroBridge() {
- return jwtShiroBridge;
- }
-
- public void setJwtShiroBridge(String jwtShiroBridge) {
- this.jwtShiroBridge = jwtShiroBridge;
- }
-
-}
diff --git a/src/main/java/io/jboot/component/jwt/JwtInterceptor.java b/src/main/java/io/jboot/component/jwt/JwtInterceptor.java
deleted file mode 100644
index 0ee50c94a2d5fe46d5c6e2452ced7f9adab103c1..0000000000000000000000000000000000000000
--- a/src/main/java/io/jboot/component/jwt/JwtInterceptor.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/**
- * Copyright (c) 2015-2018, Michael Yang 杨福海 (fuhai999@gmail.com).
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package io.jboot.component.jwt;
-
-import io.jboot.utils.StringUtils;
-import io.jboot.web.controller.JbootController;
-import io.jboot.web.fixedinterceptor.FixedInterceptor;
-import io.jboot.web.fixedinterceptor.FixedInvocation;
-import org.apache.shiro.subject.Subject;
-import org.apache.shiro.util.ThreadContext;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.util.Map;
-
-/**
- * @author Michael Yang 杨福海 (fuhai999@gmail.com)
- * @version V1.0
- * @Title: 用于对Jwt的设置
- * @Package io.jboot.web.jwt
- */
-public class JwtInterceptor implements FixedInterceptor {
-
- @Override
- public void intercept(FixedInvocation inv) {
- if (!JwtManager.me().isEnable()) {
- inv.invoke();
- return;
- }
-
- HttpServletRequest request = inv.getController().getRequest();
- String token = request.getHeader(JwtManager.me().getHttpHeaderName());
-
- if (StringUtils.isBlank(token)) {
- inv.invoke();
- processInvokeAfter(inv);
- return;
- }
-
- Map map = JwtManager.me().parseJwtToken(token);
- if (map == null) {
- inv.invoke();
- processInvokeAfter(inv);
- return;
- }
-
- JwtShiroBridge jwtShiroBridge = JwtManager.me().getJwtShiroBridge();
- if (jwtShiroBridge != null) {
- Subject subject = jwtShiroBridge.buildSubject(map, inv.getController());
- if (subject != null) {
- ThreadContext.bind(subject);
- }
- }
-
- try {
- JwtManager.me().holdJwts(map);
- inv.invoke();
- processInvokeAfter(inv);
- } finally {
- JwtManager.me().releaseJwts();
- }
- }
-
-
- private void processInvokeAfter(FixedInvocation inv) {
- if (!(inv.getController() instanceof JbootController)) {
- return;
- }
-
- JbootController jbootController = (JbootController) inv.getController();
- Map jwtMap = jbootController.getJwtAttrs();
-
- if (jwtMap == null || jwtMap.isEmpty()) {
- return;
- }
-
- String token = JwtManager.me().createJwtToken(jwtMap);
- HttpServletResponse response = inv.getController().getResponse();
- response.addHeader(JwtManager.me().getHttpHeaderName(), token);
- }
-}
diff --git a/src/main/java/io/jboot/component/jwt/JwtManager.java b/src/main/java/io/jboot/component/jwt/JwtManager.java
deleted file mode 100644
index 98edb712ece9838f05931288414d391d09f19273..0000000000000000000000000000000000000000
--- a/src/main/java/io/jboot/component/jwt/JwtManager.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/**
- * Copyright (c) 2015-2018, Michael Yang 杨福海 (fuhai999@gmail.com).
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package io.jboot.component.jwt;
-
-import com.jfinal.json.FastJson;
-import com.jfinal.kit.Base64Kit;
-import io.jboot.Jboot;
-import io.jboot.exception.JbootIllegalConfigException;
-import io.jboot.utils.ClassKits;
-import io.jboot.utils.StringUtils;
-import io.jsonwebtoken.*;
-
-import javax.crypto.SecretKey;
-import javax.crypto.spec.SecretKeySpec;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * @author Michael Yang 杨福海 (fuhai999@gmail.com)
- * @version V1.0
- * @Package io.jboot.web.jwt
- */
-public class JwtManager {
-
- private static final JwtManager me = new JwtManager();
-
- public static JwtManager me() {
- return me;
- }
-
- private JwtConfig jwtConfig = Jboot.config(JwtConfig.class);
- private ThreadLocal