2
0
Эх сурвалжийг харах

v2.7.0.GA

增加适配器注册
MaxKey 4 жил өмнө
parent
commit
21c7c956e8
22 өөрчлөгдсөн 1020 нэмэгдсэн , 95 устгасан
  1. 34 1
      ReleaseNotes.txt
  2. 105 70
      maxkey-core/src/main/java/org/maxkey/domain/apps/Apps.java
  3. 200 0
      maxkey-core/src/main/java/org/maxkey/domain/apps/AppsAdapters.java
  4. 1 1
      maxkey-persistence/src/main/java/org/maxkey/persistence/mapper/AccountsMapper.java
  5. 33 0
      maxkey-persistence/src/main/java/org/maxkey/persistence/mapper/AppsAdaptersMapper.java
  6. 40 0
      maxkey-persistence/src/main/java/org/maxkey/persistence/service/AppsAdaptersService.java
  7. 30 0
      maxkey-persistence/src/main/resources/org/maxkey/persistence/mapper/xml/mysql/AppsAdaptersMapper.xml
  8. 1 1
      maxkey-protocols/maxkey-protocol-saml-2.0/src/main/java/org/maxkey/authz/saml20/consumer/endpoint/ConsumerEndpoint.java
  9. 147 0
      maxkey-web-manage/src/main/java/org/maxkey/web/apps/contorller/AdaptersController.java
  10. 7 0
      maxkey-web-manage/src/main/resources/messages/message.properties
  11. 8 1
      maxkey-web-manage/src/main/resources/messages/message_en.properties
  12. 6 0
      maxkey-web-manage/src/main/resources/messages/message_zh_CN.properties
  13. 81 0
      maxkey-web-manage/src/main/resources/templates/views/apps/adapters/adapterAdd.ftl
  14. 71 0
      maxkey-web-manage/src/main/resources/templates/views/apps/adapters/adapterUpdate.ftl
  15. 130 0
      maxkey-web-manage/src/main/resources/templates/views/apps/adapters/adaptersList.ftl
  16. 82 0
      maxkey-web-manage/src/main/resources/templates/views/apps/adapters/selectAdaptersList.ftl
  17. 16 5
      maxkey-web-manage/src/main/resources/templates/views/apps/appAddCommon.ftl
  18. 11 6
      maxkey-web-manage/src/main/resources/templates/views/apps/appUpdateCommon.ftl
  19. 7 8
      maxkey-web-manage/src/main/resources/templates/views/apps/appsList.ftl
  20. 7 0
      maxkey-web-manage/src/main/resources/templates/views/layout/sidenav.ftl
  21. 1 1
      maxkey-web-maxkey/src/main/resources/application.properties
  22. 2 1
      maxkey-web-maxkey/src/main/resources/maxkey.properties

+ 34 - 1
ReleaseNotes.txt

@@ -1,4 +1,37 @@
-MaxKey v 2.6.0 GA	2021/03/05
+MaxKey v 2.7.0 GA	2021/04/**
+	*(MAXKEY-210301)  加入Dromara开源组织,官方网站的优化,文档优化
+	*(MAXKEY-210302)  BootJar,Docker,Standard三种打包方式的配置优化
+	*(MAXKEY-210303)  数据库访问注释由@Service改为@Repository
+	*(MAXKEY-210304)  cas logout优化支持
+	*(MAXKEY-210305)  CAS单点注销及返回数据类型适配器的优化
+	*(MAXKEY-210306)  CAS返回数据类重构
+	*(MAXKEY-210307)  ExtendApi标准优化
+	*(MAXKEY-210308)  增加基于时间签名的ExtendApi适配器
+	*(MAXKEY-210309)  返回数据Constants整合
+	*(MAXKEY-210310)  扩展数据配置优化
+	*(MAXKEY-210311)  LDAP和MS AD固定属性Constants
+	*(MAXKEY-210312)  SpringSecurity OAuth 2客户端登录适配
+	*(MAXKEY-210313)  移除Desktop的支持,后续可以开发FormBase的适配器定制
+	*(MAXKEY-210314)  application.properties profiles的优化,不同环境启动更加简单
+	*(MAXKEY-210315)  增加适配器注册功能,在配置应用时只需选择对应的适配器
+	*(MAXKEY-210316)  增加Synchronizer接口同步的功能
+	*(MAXKEY-210317)  增加TimeBased OTP接口支持
+	*(MAXKEY-210318)  XSS安全防护功能
+	*(MAXKEY-210319)  禅道项目管理系统单点登录适配
+	*(MAXKEY-210320)  GitLab单点登录适配
+	*(MAXKEY-210321)  云速邮箱单点登录适配
+	*(MAXKEY-210322)  JumpServer开源堡垒机单点登录适配
+	*(MAXKEY-210323)  华为云单点登录适配
+	*(MAXKEY-210324)  Jenkins单点登录适配
+	*(MAXKEY-210324)  查询参数优化
+	*(MAXKEY-210226)  依赖jar引用、更新和升级
+		log4j 		2.14.1
+		spring		5.3.5
+		springBoot  2.4.4
+		tomcat		9.0.44
+	
+
+MaxKey v 2.6.0 GA	2021/03/05
 	*(MAXKEY-210201)  官方网站的优化
 	*(MAXKEY-210202)  CAS代理模式实现的优化,完成demo的测试
 	*(MAXKEY-210203)  CAS代理模式Demo开发和实现

+ 105 - 70
maxkey-core/src/main/java/org/maxkey/domain/apps/Apps.java

@@ -18,6 +18,7 @@
 package org.maxkey.domain.apps;
 
 import java.io.Serializable;
+import java.util.Arrays;
 
 import javax.persistence.Column;
 import javax.persistence.Entity;
@@ -133,6 +134,12 @@ public class Apps extends JpaBaseDomain implements Serializable {
     @Column
     private int isAdapter;
     @Column
+    private String adapterId;
+    
+    @Column
+    private String adapterName;
+    
+    @Column
     private String adapter;
 
     protected Accounts appUser;
@@ -561,75 +568,103 @@ public class Apps extends JpaBaseDomain implements Serializable {
         this.onlineTicket = onlineTicket;
     }
 
-    @Override
-    public String toString() {
-        StringBuilder builder = new StringBuilder();
-        builder.append("Apps [id=");
-        builder.append(id);
-        builder.append(", name=");
-        builder.append(name);
-        builder.append(", loginUrl=");
-        builder.append(loginUrl);
-        builder.append(", category=");
-        builder.append(category);
-        builder.append(", protocol=");
-        builder.append(protocol);
-        builder.append(", secret=");
-        builder.append(secret);
-        builder.append(", visible=");
-        builder.append(visible);
-        builder.append(", inducer=");
-        builder.append(inducer);
-        builder.append(", vendor=");
-        builder.append(vendor);
-        builder.append(", vendorUrl=");
-        builder.append(vendorUrl);
-        builder.append(", credential=");
-        builder.append(credential);
-        builder.append(", sharedUsername=");
-        builder.append(sharedUsername);
-        builder.append(", sharedPassword=");
-        builder.append(sharedPassword);
-        builder.append(", systemUserAttr=");
-        builder.append(systemUserAttr);
-        builder.append(", principal=");
-        builder.append(principal);
-        builder.append(", credentials=");
-        builder.append(credentials);
-        builder.append(", logoutUrl=");
-        builder.append(logoutUrl);
-        builder.append(", logoutType=");
-        builder.append(logoutType);
-        builder.append(", isExtendAttr=");
-        builder.append(isExtendAttr);
-        builder.append(", extendAttr=");
-        builder.append(extendAttr);
-        builder.append(", userPropertys=");
-        builder.append(userPropertys);
-        builder.append(", isSignature=");
-        builder.append(isSignature);
-        builder.append(", isAdapter=");
-        builder.append(isAdapter);
-        builder.append(", adapter=");
-        builder.append(adapter);
-        builder.append(", appUser=");
-        builder.append(appUser);
-        builder.append(", sortIndex=");
-        builder.append(sortIndex);
-        builder.append(", status=");
-        builder.append(status);
-        builder.append(", createdBy=");
-        builder.append(createdBy);
-        builder.append(", createdDate=");
-        builder.append(createdDate);
-        builder.append(", modifiedBy=");
-        builder.append(modifiedBy);
-        builder.append(", modifiedDate=");
-        builder.append(modifiedDate);
-        builder.append(", description=");
-        builder.append(description);
-        builder.append("]");
-        return builder.toString();
-    }
+    public String getAdapterId() {
+		return adapterId;
+	}
+
+	public void setAdapterId(String adapterId) {
+		this.adapterId = adapterId;
+	}
+
+	public String getAdapterName() {
+		return adapterName;
+	}
+
+	public void setAdapterName(String adapterName) {
+		this.adapterName = adapterName;
+	}
+
+	@Override
+	public String toString() {
+		StringBuilder builder = new StringBuilder();
+		builder.append("Apps [id=");
+		builder.append(id);
+		builder.append(", name=");
+		builder.append(name);
+		builder.append(", loginUrl=");
+		builder.append(loginUrl);
+		builder.append(", category=");
+		builder.append(category);
+		builder.append(", protocol=");
+		builder.append(protocol);
+		builder.append(", secret=");
+		builder.append(secret);
+		builder.append(", icon=");
+		builder.append(Arrays.toString(icon));
+		builder.append(", iconFile=");
+		builder.append(iconFile);
+		builder.append(", visible=");
+		builder.append(visible);
+		builder.append(", inducer=");
+		builder.append(inducer);
+		builder.append(", vendor=");
+		builder.append(vendor);
+		builder.append(", vendorUrl=");
+		builder.append(vendorUrl);
+		builder.append(", credential=");
+		builder.append(credential);
+		builder.append(", sharedUsername=");
+		builder.append(sharedUsername);
+		builder.append(", sharedPassword=");
+		builder.append(sharedPassword);
+		builder.append(", systemUserAttr=");
+		builder.append(systemUserAttr);
+		builder.append(", principal=");
+		builder.append(principal);
+		builder.append(", credentials=");
+		builder.append(credentials);
+		builder.append(", logoutUrl=");
+		builder.append(logoutUrl);
+		builder.append(", logoutType=");
+		builder.append(logoutType);
+		builder.append(", isExtendAttr=");
+		builder.append(isExtendAttr);
+		builder.append(", extendAttr=");
+		builder.append(extendAttr);
+		builder.append(", userPropertys=");
+		builder.append(userPropertys);
+		builder.append(", isSignature=");
+		builder.append(isSignature);
+		builder.append(", isAdapter=");
+		builder.append(isAdapter);
+		builder.append(", adapterId=");
+		builder.append(adapterId);
+		builder.append(", adapterName=");
+		builder.append(adapterName);
+		builder.append(", adapter=");
+		builder.append(adapter);
+		builder.append(", appUser=");
+		builder.append(appUser);
+		builder.append(", sortIndex=");
+		builder.append(sortIndex);
+		builder.append(", status=");
+		builder.append(status);
+		builder.append(", createdBy=");
+		builder.append(createdBy);
+		builder.append(", createdDate=");
+		builder.append(createdDate);
+		builder.append(", modifiedBy=");
+		builder.append(modifiedBy);
+		builder.append(", modifiedDate=");
+		builder.append(modifiedDate);
+		builder.append(", description=");
+		builder.append(description);
+		builder.append(", loginDateTime=");
+		builder.append(loginDateTime);
+		builder.append(", onlineTicket=");
+		builder.append(onlineTicket);
+		builder.append("]");
+		return builder.toString();
+	}
 
 }

+ 200 - 0
maxkey-core/src/main/java/org/maxkey/domain/apps/AppsAdapters.java

@@ -0,0 +1,200 @@
+/*
+ * Copyright [2021] [MaxKey of copyright http://www.maxkey.top]
+ * 
+ * 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 org.maxkey.domain.apps;
+
+import java.io.Serializable;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.Table;
+import org.apache.mybatis.jpa.persistence.JpaBaseDomain;
+
+@Entity
+@Table(name = "MXK_APPS_ADAPTERS")
+public class AppsAdapters extends JpaBaseDomain implements Serializable {
+
+    /**
+     * 
+     */
+    private static final long serialVersionUID = -6264641546959620712L;
+
+    @Id
+    @Column
+    @GeneratedValue(strategy = GenerationType.AUTO, generator = "uuid")
+    protected String id;
+    /**
+     * 
+     */
+    @Column
+    private String name;
+
+    @Column
+    private String protocol;
+    
+    @Column
+    private String adapter;
+
+    @Column
+    protected int sortIndex;
+
+    @Column
+    protected String createdBy;
+    @Column
+    protected String createdDate;
+    @Column
+    protected String modifiedBy;
+    @Column
+    protected String modifiedDate;
+    @Column
+    protected String description;
+    
+    
+    public AppsAdapters() {
+    }
+
+
+	public String getId() {
+		return id;
+	}
+
+
+	public void setId(String id) {
+		this.id = id;
+	}
+
+
+	public String getName() {
+		return name;
+	}
+
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+
+	public String getProtocol() {
+		return protocol;
+	}
+
+
+	public void setProtocol(String protocol) {
+		this.protocol = protocol;
+	}
+
+
+	public String getAdapter() {
+		return adapter;
+	}
+
+
+	public void setAdapter(String adapter) {
+		this.adapter = adapter;
+	}
+
+
+	public int getSortIndex() {
+		return sortIndex;
+	}
+
+
+	public void setSortIndex(int sortIndex) {
+		this.sortIndex = sortIndex;
+	}
+
+
+	public String getCreatedBy() {
+		return createdBy;
+	}
+
+
+	public void setCreatedBy(String createdBy) {
+		this.createdBy = createdBy;
+	}
+
+
+	public String getCreatedDate() {
+		return createdDate;
+	}
+
+
+	public void setCreatedDate(String createdDate) {
+		this.createdDate = createdDate;
+	}
+
+
+	public String getModifiedBy() {
+		return modifiedBy;
+	}
+
+
+	public void setModifiedBy(String modifiedBy) {
+		this.modifiedBy = modifiedBy;
+	}
+
+
+	public String getModifiedDate() {
+		return modifiedDate;
+	}
+
+
+	public void setModifiedDate(String modifiedDate) {
+		this.modifiedDate = modifiedDate;
+	}
+
+
+	public String getDescription() {
+		return description;
+	}
+
+
+	public void setDescription(String description) {
+		this.description = description;
+	}
+
+
+	@Override
+	public String toString() {
+		StringBuilder builder = new StringBuilder();
+		builder.append("AppsAdapters [id=");
+		builder.append(id);
+		builder.append(", name=");
+		builder.append(name);
+		builder.append(", protocol=");
+		builder.append(protocol);
+		builder.append(", adapter=");
+		builder.append(adapter);
+		builder.append(", sortIndex=");
+		builder.append(sortIndex);
+		builder.append(", createdBy=");
+		builder.append(createdBy);
+		builder.append(", createdDate=");
+		builder.append(createdDate);
+		builder.append(", modifiedBy=");
+		builder.append(modifiedBy);
+		builder.append(", modifiedDate=");
+		builder.append(modifiedDate);
+		builder.append(", description=");
+		builder.append(description);
+		builder.append("]");
+		return builder.toString();
+	}
+
+}

+ 1 - 1
maxkey-persistence/src/main/java/org/maxkey/persistence/mapper/AccountsMapper.java

@@ -1,5 +1,5 @@
 /*
- * Copyright [2020] [MaxKey of copyright http://www.maxkey.top]
+ * Copyright [2021] [MaxKey of copyright http://www.maxkey.top]
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.

+ 33 - 0
maxkey-persistence/src/main/java/org/maxkey/persistence/mapper/AppsAdaptersMapper.java

@@ -0,0 +1,33 @@
+/*
+ * Copyright [2021] [MaxKey of copyright http://www.maxkey.top]
+ * 
+ * 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 org.maxkey.persistence.mapper;
+
+import org.apache.mybatis.jpa.persistence.IJpaBaseMapper;
+import org.maxkey.domain.apps.AppsAdapters;
+
+/**
+ * @author Crystal.sea
+ *
+ */
+public  interface AppsAdaptersMapper extends IJpaBaseMapper<AppsAdapters> {
+	
+
+}

+ 40 - 0
maxkey-persistence/src/main/java/org/maxkey/persistence/service/AppsAdaptersService.java

@@ -0,0 +1,40 @@
+/*
+ * Copyright [2021] [MaxKey of copyright http://www.maxkey.top]
+ * 
+ * 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 org.maxkey.persistence.service;
+
+import org.apache.mybatis.jpa.persistence.JpaBaseService;
+import org.maxkey.domain.apps.AppsAdapters;
+import org.maxkey.persistence.mapper.AppsAdaptersMapper;
+import org.springframework.stereotype.Repository;
+
+@Repository
+public class AppsAdaptersService  extends JpaBaseService<AppsAdapters>{
+
+	public AppsAdaptersService() {
+		super(AppsAdaptersMapper.class);
+	}
+
+	/* (non-Javadoc)
+	 * @see com.connsec.db.service.BaseService#getMapper()
+	 */
+	@Override
+	public AppsAdaptersMapper getMapper() {
+		// TODO Auto-generated method stub
+		return (AppsAdaptersMapper)super.getMapper();
+	}
+}

+ 30 - 0
maxkey-persistence/src/main/resources/org/maxkey/persistence/mapper/xml/mysql/AppsAdaptersMapper.xml

@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.maxkey.persistence.mapper.AppsAdaptersMapper">
+
+	<sql id="where_statement">
+    	<if test="id != null and id != ''">
+			AND	ID	=	#{id}
+		</if> 
+		<if test="name != null and name != ''">
+			AND NAME  LIKE  '%${name}%'
+		</if> 
+		<if test="protocol != null and protocol != ''">
+			AND	PROTOCOL	=	#{protocol}
+		</if> 
+    </sql>
+    
+	
+	
+	<select id="queryPageResults" parameterType="AppsAdapters" resultType="AppsAdapters">
+		SELECT
+			*
+		FROM
+			MXK_APPS_ADAPTERS
+		WHERE
+			 (1=1)	
+		<include refid="where_statement"/>
+		ORDER BY  SORTINDEX
+	</select>
+	
+</mapper>

+ 1 - 1
maxkey-protocols/maxkey-protocol-saml-2.0/src/main/java/org/maxkey/authz/saml20/consumer/endpoint/ConsumerEndpoint.java

@@ -187,7 +187,7 @@ public class ConsumerEndpoint {
 		ModelAndView mav = new ModelAndView();
 		mav.addObject("username", username);
 
-		mav.setViewName("redirect:/consumer/saml/v20/forward/webseal/eai");
+		mav.setViewName("redirect:/appList");
 		return mav;
 	}
 

+ 147 - 0
maxkey-web-manage/src/main/java/org/maxkey/web/apps/contorller/AdaptersController.java

@@ -0,0 +1,147 @@
+/*
+ * Copyright [2020] [MaxKey of copyright http://www.maxkey.top]
+ * 
+ * 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 org.maxkey.web.apps.contorller;
+
+import org.apache.mybatis.jpa.persistence.JpaPageResults;
+import org.maxkey.constants.ConstantsOperateMessage;
+import org.maxkey.domain.apps.AppsAdapters;
+import org.maxkey.persistence.service.AppsAdaptersService;
+import org.maxkey.web.WebContext;
+import org.maxkey.web.message.Message;
+import org.maxkey.web.message.MessageType;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.ModelAttribute;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.servlet.ModelAndView;
+
+
+@Controller
+@RequestMapping(value={"/apps/adapters"})
+public class AdaptersController {
+	final static Logger _logger = LoggerFactory.getLogger(AdaptersController.class);
+	
+	@Autowired
+	@Qualifier("appsAdaptersService")
+	AppsAdaptersService appsAdaptersService;
+
+	
+	
+	@RequestMapping(value={"/list"})
+	public ModelAndView rolesList(){
+		return new ModelAndView("apps/adapters/adaptersList");
+	}
+	
+	@RequestMapping(value={"/selectAdaptersList"})
+	public ModelAndView selectRolesList(){
+		return new ModelAndView("apps/adapters/selectAdaptersList");
+	}
+	
+	
+	@RequestMapping(value = { "/grid" })
+	@ResponseBody
+	public JpaPageResults<AppsAdapters> queryDataGrid(@ModelAttribute("appsAdapter") AppsAdapters appsAdapter) {
+		_logger.debug(""+appsAdapter);
+		return appsAdaptersService.queryPageResults(appsAdapter);
+	}
+
+	
+	@RequestMapping(value = { "/forwardAdd" })
+	public ModelAndView forwardAdd() {
+		return new ModelAndView("apps/adapters/adapterAdd");
+	}
+	
+	@RequestMapping(value = { "/forwardUpdate/{id}" })
+	public ModelAndView forwardUpdate(@PathVariable("id") String id) {
+		ModelAndView modelAndView=new ModelAndView("apps/adapters/adapterUpdate");
+		AppsAdapters appsAdapter=appsAdaptersService.get(id);
+		modelAndView.addObject("model",appsAdapter);
+		return modelAndView;
+	}
+	
+	@ResponseBody
+	@RequestMapping(value={"/add"})
+	public Message insert(@ModelAttribute("appsAdapter") AppsAdapters appsAdapter) {
+		_logger.debug("-Add  :" + appsAdapter);
+		
+		if (appsAdaptersService.insert(appsAdapter)) {
+			return  new Message(WebContext.getI18nValue(ConstantsOperateMessage.INSERT_SUCCESS),MessageType.success);
+			
+		} else {
+			return  new Message(WebContext.getI18nValue(ConstantsOperateMessage.INSERT_SUCCESS),MessageType.error);
+		}
+		
+	}
+	
+	/**
+	 * 查询
+	 * @param role
+	 * @return
+	 */
+	@ResponseBody
+	@RequestMapping(value={"/query"}) 
+	public Message query(@ModelAttribute("appsAdapter") AppsAdapters appsAdapter) {
+		_logger.debug("-query  :" + appsAdapter);
+		if (appsAdaptersService.load(appsAdapter)!=null) {
+			return  new Message(WebContext.getI18nValue(ConstantsOperateMessage.INSERT_SUCCESS),MessageType.success);
+			
+		} else {
+			return  new Message(WebContext.getI18nValue(ConstantsOperateMessage.INSERT_ERROR),MessageType.error);
+		}
+		
+	}
+	
+	/**
+	 * 修改
+	 * @param role
+	 * @return
+	 */
+	@ResponseBody
+	@RequestMapping(value={"/update"})  
+	public Message update(@ModelAttribute("appsAdapter") AppsAdapters appsAdapter) {
+		_logger.debug("-update  appsAdapter :" + appsAdapter);
+		
+		if (appsAdaptersService.update(appsAdapter)) {
+			return  new Message(WebContext.getI18nValue(ConstantsOperateMessage.UPDATE_SUCCESS),MessageType.success);
+			
+		} else {
+			return  new Message(WebContext.getI18nValue(ConstantsOperateMessage.UPDATE_ERROR),MessageType.error);
+		}
+		
+	}
+	
+
+	@ResponseBody
+	@RequestMapping(value={"/delete"})
+	public Message delete(@ModelAttribute("appsAdapter") AppsAdapters appsAdapter) {
+		_logger.debug("-delete  appsAdapter :" + appsAdapter);
+		
+		if (appsAdaptersService.remove(appsAdapter.getId())) {
+			return  new Message(WebContext.getI18nValue(ConstantsOperateMessage.DELETE_SUCCESS),MessageType.success);
+			
+		} else {
+			return  new Message(WebContext.getI18nValue(ConstantsOperateMessage.DELETE_SUCCESS),MessageType.error);
+		}
+		
+	}
+}

+ 7 - 0
maxkey-web-manage/src/main/resources/messages/message.properties

@@ -28,6 +28,7 @@ common.grid.loadtext=\u6b63\u5728\u52a0\u8f7d...
 common.grid.loadnodata=\u6ca1\u6709\u67e5\u8be2\u5230\u7b26\u5408\u6570\u636e
 common.submit.hintText=\u60a8\u786e\u5b9a\u8981\u8fdb\u884c\u6b64\u9879\u64cd\u4f5c\u5417?
 common.submit.errorText=\u6267\u884c\u64cd\u4f5c\u5931\u8d25
+common.text.id=\u7F16\u53F7
 common.text.startdate=\u5f00\u59cb\u65f6\u95f4
 common.text.enddate=\u7ed3\u675f\u65f6\u95f4
 common.text.createdby=\u521b\u5efa\u4eba
@@ -307,6 +308,11 @@ apps.extendAttr.parameter.value=\u503c
 apps.principal=\u51ed\u8bc1
 apps.credentials=\u79d8\u94a5
 
+#adapter
+apps.adapter.name=\u540D\u79F0
+apps.adapter.adapter=\u9002\u914D\u5668
+apps.adapter.protocol=\u534F\u8BAE
+
 #formbased
 apps.formbased.info=\u8868\u5355\u8ba4\u8bc1
 apps.formbased.redirectUri=\u8ba4\u8bc1\u5730\u5740
@@ -538,3 +544,4 @@ navs.roles=\u89d2\u8272\u7ba1\u7406
 navs.role.member=\u89d2\u8272\u7528\u6237
 navs.role.permissions=\u89d2\u8272\u6743\u9650\u7ba1\u7406
 navs.resources=\u8d44\u6e90\u7ba1\u7406
+navs.adapters=\u9002\u914D\u5668\u6CE8\u518C

+ 8 - 1
maxkey-web-manage/src/main/resources/messages/message_en.properties

@@ -28,6 +28,7 @@ common.grid.loadtext=Data loading ...
 common.grid.loadnodata=No matching data found
 common.submit.hintText=Are you sure you want to do this?
 common.submit.errorText=Failed to perform operation
+common.text.id=Id
 common.text.startdate=StartDate
 common.text.enddate=EndDate
 common.text.createdby=CreatedBy
@@ -307,6 +308,11 @@ apps.extendAttr.parameter.value=value
 apps.principal=principal
 apps.credentials=credentials
 
+#adapter
+apps.adapter.name=name
+apps.adapter.adapter=adapter
+apps.adapter.protocol=protocol
+
 #formbased
 apps.formbased.info=formbased Info
 apps.formbased.redirectUri=redirectUri
@@ -537,4 +543,5 @@ navs.audit.operate=Operate
 navs.roles=Roles
 navs.role.member=RoleMember
 navs.role.permissions=Permissions
-navs.resources=Resources
+navs.resources=Resources
+navs.adapters=Adapters

+ 6 - 0
maxkey-web-manage/src/main/resources/messages/message_zh_CN.properties

@@ -28,6 +28,7 @@ common.grid.loadtext=\u6b63\u5728\u52a0\u8f7d...
 common.grid.loadnodata=\u6ca1\u6709\u67e5\u8be2\u5230\u7b26\u5408\u6570\u636e
 common.submit.hintText=\u60a8\u786e\u5b9a\u8981\u8fdb\u884c\u6b64\u9879\u64cd\u4f5c\u5417?
 common.submit.errorText=\u6267\u884c\u64cd\u4f5c\u5931\u8d25
+common.text.id=\u7F16\u53F7
 common.text.startdate=\u5f00\u59cb\u65f6\u95f4
 common.text.enddate=\u7ed3\u675f\u65f6\u95f4
 common.text.createdby=\u521b\u5efa\u4eba
@@ -307,6 +308,10 @@ apps.extendAttr.parameter.value=\u503c
 apps.principal=\u51ed\u8bc1
 apps.credentials=\u79d8\u94a5
 
+apps.adapter.name=\u540D\u79F0
+apps.adapter.adapter=\u9002\u914D\u5668
+apps.adapter.protocol=\u534F\u8BAE
+
 #formbased
 apps.formbased.info=\u8868\u5355\u8ba4\u8bc1
 apps.formbased.redirectUri=\u8ba4\u8bc1\u5730\u5740
@@ -539,3 +544,4 @@ navs.roles=\u89d2\u8272\u7ba1\u7406
 navs.role.member=\u89d2\u8272\u7528\u6237
 navs.role.permissions=\u89d2\u8272\u6743\u9650\u7ba1\u7406
 navs.resources=\u8d44\u6e90\u7ba1\u7406
+navs.adapters=\u9002\u914D\u5668\u6CE8\u518C

+ 81 - 0
maxkey-web-manage/src/main/resources/templates/views/apps/adapters/adapterAdd.ftl

@@ -0,0 +1,81 @@
+<!DOCTYPE HTML>
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+	<#include  "../../layout/header.ftl"/>
+	<#include  "../../layout/common.cssjs.ftl"/>
+<style   type="text/css">
+  .table th, .table td {
+    padding: .2rem;
+    vertical-align: middle;
+  }
+</style>
+<script type="text/javascript">
+
+</script>
+</head>
+<body>
+<form id="actionForm"  method="post" type="label" autoclose="true"  action="<@base/>/apps/adapters/add"  class="needs-validation" novalidate>
+	<table border="0" cellpadding="0" cellspacing="0" class="table table-bordered" >
+		<tbody>
+			<tr>
+				<th><@locale code="common.text.id" />:</th>
+				<td nowrap>
+					<input type="text" id="id" name="id" class="form-control" title="" value=""  />
+				</td>
+			</tr>
+			<tr>
+				<th><@locale code="apps.adapter.name" />:</th>
+				<td nowrap>
+					<input type="text" id="name" name="name" class="form-control" title="" value=""  required="" />
+				</td>
+			</tr>
+			<tr>
+				<th><@locale code="apps.adapter.protocol" />:</th>
+				<td nowrap>
+					<select name="protocol" class="form-control">
+	 					<option value=""  selected>Select</option>
+	 					<option value="OAuth_v2.0"><@locale code="apps.protocol.oauth2.0" /></option>
+	 					<option value="SAML_v2.0"><@locale code="apps.protocol.saml2.0" /></option>
+	 					<option value="CAS"><@locale code="apps.protocol.cas" /></option>
+	 					<option value="JWT"><@locale code="apps.protocol.jwt" /></option>
+	 					<option value="Token_Based"><@locale code="apps.protocol.tokenbased" /></option>
+	 					<option value="Extend_API"><@locale code="apps.protocol.extendapi" /></option>
+	 					<option value="Form_Based"><@locale code="apps.protocol.formbased" /></option>
+	 				</select>
+				</td>
+			</tr>
+			<tr>
+				<th><@locale code="apps.adapter.adapter" />:</th>
+				<td nowrap>
+					<input type="text" id="adapter" name="adapter" class="form-control" title="" value=""  required="" />
+				</td>
+			</tr>
+			<tr>
+	         	<th><@locale code="common.text.sortindex"/></th>
+	         	<td>
+	         		<input  type="text" id="sortIndex" class="form-control"  name="sortIndex"  title="" value="1"  required=""    />
+	         	</td>
+	      	</tr>
+			<tr>
+                <th><@locale code="common.text.description" />:</th>
+                <td nowrap>
+                    <textarea id="description" name="description" class="form-control"  rows="2" cols="20"></textarea>
+                </td>
+            </tr>
+			
+			<tr>
+				<td nowrap colspan="2" class="center">
+					<input id="_method" type="hidden" name="_method"  value="post"/>
+					<input  id="status" type="hidden" name="status"  value="1"/>
+		    		<input class="button btn btn-primary mr-3"  id="submitBtn" type="submit" value="<@locale code="button.text.save" />">
+	  				<input class="button btn btn-secondary mr-3"  id="closeBtn"   type="button" value="<@locale code="button.text.cancel" />"> 
+				</td>
+			</tr>
+		</tbody>
+	</table>
+</form>
+<div id="orgContent" class="menuContent" style="display:none; position: absolute;">
+	<ul id="orgsTree" class="ztree" style="margin-top:0; width:180px; height: 300px;"></ul>
+</div>
+</body>
+</html>

+ 71 - 0
maxkey-web-manage/src/main/resources/templates/views/apps/adapters/adapterUpdate.ftl

@@ -0,0 +1,71 @@
+<!DOCTYPE HTML>
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+	<#include  "../../layout/header.ftl"/>
+	<#include  "../../layout/common.cssjs.ftl"/>
+<style   type="text/css">
+  .table th, .table td {
+    padding: .2rem;
+    vertical-align: middle;
+  }
+</style>
+<script type="text/javascript">
+
+</script>
+</head>
+<body>
+<form id="actionForm"  method="post" type="label" autoclose="true"  action="<@base/>/apps/adapters/update"  class="needs-validation" novalidate>
+	 <table  border="0" cellpadding="0" cellspacing="0" class="table table-bordered">
+		<tbody>
+		<tr>
+			<th><@locale code="common.text.id" />:</th>
+			<td nowrap>
+				<input id="id" type="text" readonly name="id"  class="form-control"   value="${model.id}"/>
+			</td>
+		</tr>
+		<tr>
+			<th><@locale code="apps.adapter.name" />:</th>
+			<td nowrap>
+				<input type="text" id="name" name="name" class="form-control" title="" value="${model.name!}"  required="" />
+			</td>
+		</tr>
+		<tr>
+				<th><@locale code="apps.adapter.protocol" />:</th>
+				<td nowrap>
+					<input type="text" readonly id="protocol" name="protocol" class="form-control" title="" value="${model.protocol!}"  required="" />
+				</td>
+		</tr>
+		<tr>
+				<th><@locale code="apps.adapter.adapter" />:</th>
+				<td nowrap>
+					<input type="text" id="adapter" name="adapter" class="form-control" title="" value="${model.adapter!}"  required="" />
+				</td>
+		</tr>
+		<tr>
+	         	<th><@locale code="common.text.sortindex"/></th>
+	         	<td>
+	         		<input  type="text" id="sortIndex" class="form-control"  name="sortIndex"  title="" value="${model.sortIndex!}"  required=""    />
+	         	</td>
+	      </tr>
+		<tr>
+                <th><@locale code="common.text.description" />:</th>
+                <td nowrap>
+                	<textarea id="description" name="description" class="form-control"  rows="2" cols="20">${model.description!}</textarea>
+                </td>
+            </tr>
+		<tr>
+			<td nowrap colspan="2"  class="center">
+				<input id="_method" type="hidden" name="_method"  value="post"/>
+				<input id="status" type="hidden" name="status"  value="1"/>
+	    		<input class="button btn btn-primary mr-3"  id="submitBtn" type="submit" value="<@locale code="button.text.save" />">
+  				<input class="button btn btn-secondary mr-3"  id="closeBtn"   type="button" value="<@locale code="button.text.cancel" />">	 
+			</td>
+		</tr>
+		</tbody>
+	  </table>
+</form>
+<div id="orgContent" class="menuContent" style="display:none; position: absolute;">
+	<ul id="orgsTree" class="ztree" style="margin-top:0; width:180px; height: 300px;"></ul>
+</div>
+</body>
+</html>

+ 130 - 0
maxkey-web-manage/src/main/resources/templates/views/apps/adapters/adaptersList.ftl

@@ -0,0 +1,130 @@
+<!DOCTYPE HTML>
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+	<#include  "../../layout/header.ftl"/>
+	<#include  "../../layout/common.cssjs.ftl"/>
+	<script type="text/javascript">	
+		function dynamicFormatter(value, row, index){
+	  		return value=='0'? '<@locale code="common.text.no" />':'<@locale code="common.text.yes" />';
+		};
+	</script>
+</head>
+<body> 
+<div class="app header-default side-nav-dark">
+<div class="layout">
+	<div class="header navbar">
+		<#include  "../../layout/top.ftl"/>
+	</div>
+	
+	<div class="col-md-3 sidebar-nav side-nav" >
+ 		<#include  "../../layout/sidenav.ftl"/>
+	</div>
+	<div class="page-container">
+	
+	<div class="main-content">
+		<div class="container-fluid">
+			<div class="breadcrumb-wrapper row">
+				<div class="col-12 col-lg-3 col-md-6">
+					<h4 class="page-title"><@locale code="navs.adapters"/></h4>
+				</div>
+				<div class="col-12 col-lg-9 col-md-6">
+					<ol class="breadcrumb float-right">
+						<li><a href="<@base/>/main"><@locale code="navs.home"/></a></li>
+						<li class="active">/ <@locale code="navs.adapters"/></li>
+					</ol>
+				</div>
+			</div>
+		</div>
+		<div class="container-fluid">
+			<div class="content-wrapper row">
+			<div class="col-12 grid-margin">
+				<div class="card">
+					<div class="card-body">
+		
+			<table  class="table table-bordered">
+ 				<tr>
+		 			<td width="120px"><@locale code="apps.adapter.name"/>:</td>
+		 			<td width="375px">
+		 				<form id="basic_search_form">
+			 				<input class="form-control" type="text" name="name"  style ="width:150px;float:left;">
+			 				<input  class="button btn btn-primary mr-3"    id="searchBtn" type="button" size="50" value="<@locale code="button.text.search"/>">
+				 			<!--<input  class="button btn btn-secondary"  id="advancedSearchExpandBtn" type="button" size="50"  value="<@locale code="button.text.expandsearch"/>" expandValue="<@locale code="button.text.expandsearch"/>"  collapseValue="<@locale code="button.text.collapsesearch"/>">
+					 		-->
+					 	</form>
+		 			</td>
+		 			<td colspan="2">
+		 				<div id="tool_box_right">
+		 					 <input class="button btn btn-success mr-3" id="addBtn" type="button" value="<@locale code="button.text.add"/>" 
+						 		    wurl="<@base/>/apps/adapters/forwardAdd"
+						 		    wwidth="700"
+						 		    wheight="350"
+					 		    	target="window">	    	
+					 		    	
+					 	<input class="button btn btn-info mr-3 " id="modifyBtn" type="button" value="<@locale code="button.text.edit"/>" 
+					 				wurl="<@base/>/apps/adapters/forwardUpdate"
+					 				wwidth="700"
+						 		    wheight="350"
+					 		    	target="window"> 
+					 		    	
+					 	<input class="button btn btn-danger mr-3 "  id="deleteBtn" type="button" value="<@locale code="button.text.delete"/>"
+					 				wurl="<@base/>/apps/adapters/delete" />
+						</div>
+		 			</td>
+		 		</tr>
+		 	</table>
+		
+		 		
+ 	</div>
+ 	
+ 	<div id="advanced_search">
+ 		<form id="advanced_search_form">
+	 		
+	 	</form>
+ 	</div>
+		<table  data-url="<@base/>/apps/adapters/grid"
+			id="datagrid"
+				data-toggle="table"
+				data-classes="table table-bordered table-hover table-striped"
+				data-click-to-select="true"
+				data-pagination="true"
+				data-total-field="records"
+				data-page-list="[10, 25, 50, 100]"
+				data-search="false"
+				data-locale="zh-CN"
+				data-query-params="dataGridQueryParams"
+				data-query-params-type="pageSize"
+				data-side-pagination="server">
+		<thead>
+			<tr>
+				<th data-checkbox="true"></th>
+				<th data-sortable="true" data-field="id"   data-visible="false">Id</th>
+				<th data-field="name"><@locale code="apps.adapter.name"/></th>
+				<th data-field="protocol" ><@locale code="apps.adapter.protocol"/></th>
+				<th data-field="description"><@locale code="common.text.description"/></th>
+				<th data-field="createdBy"    data-visible="false"><@locale code="common.text.createdby"/></th>
+				<th data-field="createdDate"  data-visible="false"><@locale code="common.text.createddate"/></th>
+				<th data-field="modifiedBy"   data-visible="false"><@locale code="common.text.modifiedby"/></th>
+				<th data-field="modifiedDate" data-visible="false"><@locale code="common.text.modifieddate"/></th>
+	
+			</tr>
+		</thead>
+	</table>
+	
+	
+</div>
+					</div>
+</div>
+	<footer class="content-footer">
+		<#include  "../../layout/footer.ftl"/>
+	</footer>
+	</div>
+	
+	</div>
+</div>
+
+<div id="preloader">
+<div class="loader" id="loader-1"></div>
+</div>
+
+</body>
+</html>

+ 82 - 0
maxkey-web-manage/src/main/resources/templates/views/apps/adapters/selectAdaptersList.ftl

@@ -0,0 +1,82 @@
+<!DOCTYPE HTML>
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+	<#include  "../../layout/header.ftl"/>
+	<#include  "../../layout/common.cssjs.ftl"/>
+<style   type="text/css">
+  .table th, .table td {
+    padding: .2rem;
+    vertical-align: middle;
+  }
+</style>
+<script type="text/javascript">	
+	
+	$(function () {
+		$("#selectBtn").on("click",function(){
+			var seldata=$.dataGridSelRowsData("#datagrid"); 
+			console.log(seldata[0].id+" - "+seldata[0].name);
+			$("#adapterId", window.parent.document).val(seldata[0].id);
+			$("#adapterName", window.parent.document).val(seldata[0].name);
+			$("#adapter", window.parent.document).val(seldata[0].adapter);
+			$.closeWindow();
+		 			
+		});
+	});
+</script>
+</head>
+<body>
+	<div id="tool_box">
+	 		<table   class="datatable">
+ 				<tr>
+		 			<td width="120px"><@locale code="role.name"/>:</td>
+		 			<td width="374px">
+		 				<form id="basic_search_form">
+				 			<input class="form-control" type="text" name="name" style ="width:150px;float: left;">
+				 			<input class="button btn btn-success mr-3"  id="searchBtn" type="button" size="50" value="<@locale code="button.text.search"/>">
+				 		</form>
+		 			</td>
+				 	<td colspan="2"> 
+					 	<div id="tool_box_right" style="width: auto;">
+							<input  class="button btn btn-primary mr-3"   id="selectBtn" type="button" value="<@locale code="button.text.select"/>" >
+						</div>
+				 	</td>
+				</tr>
+			
+			</table>
+ 	</div>
+ 	
+	<div class="mainwrap" id="main">
+		<table  data-url="<@base/>/apps/adapters/grid"
+			id="datagrid"
+				data-toggle="table"
+				data-classes="table table-bordered table-hover table-striped"
+				data-click-to-select="true"
+				data-pagination="true"
+				data-total-field="records"
+				data-page-list="[10, 25, 50, 100]"
+				data-search="false"
+				data-locale="zh-CN"
+				data-query-params="dataGridQueryParams"
+				data-query-params-type="pageSize"
+				data-side-pagination="server">
+		<thead>
+			<tr>
+				<th data-checkbox="true"></th>
+				<th data-sortable="true" data-field="id"   data-visible="1false"><@locale code="common.text.id"/></th>
+				<th data-field="name"><@locale code="apps.adapter.name"/></th>
+				<th data-field="protocol" ><@locale code="apps.adapter.protocol"/></th>
+				<th data-field="adapter"       data-visible="false"><@locale code="apps.adapter.adapter"/></th>
+				<th data-field="description"><@locale code="common.text.description"/></th>
+				<th data-field="createdBy"     data-visible="false"><@locale code="common.text.createdby"/></th>
+				<th data-field="createdDate"   data-visible="false"><@locale code="common.text.createddate"/></th>
+				<th data-field="modifiedBy"    data-visible="false"><@locale code="common.text.modifiedby"/></th>
+				<th data-field="modifiedDate"  data-visible="false"><@locale code="common.text.modifieddate"/></th>
+	
+			</tr>
+		</thead>
+	</table>
+			
+	</div>
+	
+</body>
+</html>

+ 16 - 5
maxkey-web-manage/src/main/resources/templates/views/apps/appAddCommon.ftl

@@ -97,14 +97,25 @@
 				<option value="1"><@locale code="apps.isAdapter.yes" /></option>
 			</select>
 		</td>
+		<th><@locale code="apps.adapter" />:</th>
 		<td >
+			<input type="hidden" class="form-control"   id="adapterId" name="adapterId"  title="" value=""/>
+			<input type="text"  class="form-control"    id="adapterName" name="adapterName"  title="" value="" style="width: 80%;float: left;"/>
+			<input type="hidden" class="form-control"   id="adapter" name="adapter"  title="" value=""/>
+			
+			<input class="button btn btn-success mr-3 window" style="float: left;" id="selectAdaptersBtn" type="button" 
+         			value="<@locale code="button.text.select"/>" 
+		 		    wurl="<@base/>/apps/adapters/selectAdaptersList"
+		 		    wwidth="750"
+		 		    wheight="600"
+	 		    	target="window">
 		</td>
 	</tr>
 	<tr>
-		<th><@locale code="apps.adapter" />:</th>
-		<td colspan =3>
-			<input type="text" class="form-control"   id="adapter" name="adapter"  title="" value=""/>
-		</td>
-	</tr>
+         <th><@locale code="common.text.description"/>:</th>
+         <td colspan =3>
+            <input  type="text"  class="form-control" id="description" name="description"  title="" value=""/>
+         </td>
+      </tr>
    </tbody>
 </table>

+ 11 - 6
maxkey-web-manage/src/main/resources/templates/views/apps/appUpdateCommon.ftl

@@ -100,13 +100,18 @@
 				<option value="1"  <#if 1==model.isAdapter>selected</#if> ><@locale code="apps.isAdapter.yes"/></option>
 			</select>
 		</td>
-		<td >
-		</td>
-	</tr>
-	<tr>
 		<th><@locale code="apps.adapter" />:</th>
-		<td colspan =3>
-			<input type="text" class="form-control"   id="adapter" name="adapter"  title="" value="${model.adapter!}"/>
+		<td>
+			<input type="hidden" class="form-control"   id="adapterId" name="adapterId"  title="" value="${model.adapterId!}"/>
+			<input type="text" class="form-control"     id="adapterName" name="adapterName"  title="" value="${model.adapterName!}"  style="width: 80%;float: left;"/>
+			<input type="hidden" class="form-control"   id="adapter" name="adapter"  title="" value="${model.adapter!}"/>
+			
+			<input class="button btn btn-success mr-3 window" style="float: left;" id="selectAdaptersBtn" type="button" 
+         			value="<@locale code="button.text.select"/>" 
+		 		    wurl="<@base/>/apps/adapters/selectAdaptersList"
+		 		    wwidth="750"
+		 		    wheight="600"
+	 		    	target="window">
 		</td>
 	</tr>
 	 <tr>

+ 7 - 8
maxkey-web-manage/src/main/resources/templates/views/apps/appsList.ftl

@@ -160,14 +160,13 @@
 		 			<td width="374px">
 		 				<select name="protocol" class="form-control">
 		 					<option value=""  selected>Select</option>
-		 					<option value="<%=PROTOCOLS.FORMBASED%>"><%=PROTOCOLS.FORMBASED%></option>
-		 					<option value="<%=PROTOCOLS.OPEN_ID_CONNECT%>"><%=PROTOCOLS.OPEN_ID_CONNECT%></option>
-		 					<option value="<%=PROTOCOLS.OAUTH20%>"><%=PROTOCOLS.OAUTH20%></option>
-		 					<option value="<%=PROTOCOLS.SAML20%>"><%=PROTOCOLS.SAML20%></option>
-		 					<option value="<%=PROTOCOLS.TOKENBASED%>"><%=PROTOCOLS.TOKENBASED%></option>
-		 					<option value="<%=PROTOCOLS.DESKTOP%>"><%=PROTOCOLS.DESKTOP%></option>
-		 					<option value="<%=PROTOCOLS.BASIC%>"><%=PROTOCOLS.BASIC%></option>
-		 					
+		 					<option value="OAuth_v2.0"><@locale code="apps.protocol.oauth2.0" /></option>
+		 					<option value="SAML_v2.0"><@locale code="apps.protocol.saml2.0" /></option>
+		 					<option value="CAS"><@locale code="apps.protocol.cas" /></option>
+		 					<option value="JWT"><@locale code="apps.protocol.jwt" /></option>
+		 					<option value="Token_Based"><@locale code="apps.protocol.tokenbased" /></option>
+		 					<option value="Extend_API"><@locale code="apps.protocol.extendapi" /></option>
+		 					<option value="Form_Based"><@locale code="apps.protocol.formbased" /></option>
 		 				</select>
 		 			</td>
 		 			<td width="120px"><@locale code="apps.vendor"/></td>

+ 7 - 0
maxkey-web-manage/src/main/resources/templates/views/layout/sidenav.ftl

@@ -64,6 +64,7 @@
        		<span class="fa fa-fw fa-cogs fa-lg"></span>
      	</a>
      	<ul>
+     		
 	       <li>
              <a class="side-nav-menu" href="<@base />/roles/list/">
                 <@locale code="navs.roles"/>  
@@ -89,6 +90,12 @@
              </a>
            </li>
            <li>
+             <a class="side-nav-menu" href="<@base />/apps/adapters/list/">
+                <@locale code="navs.adapters"/>  
+                <span class="fa fa-fw fa-shield"></span>
+             </a>
+           </li>
+           <li>
              <a class="side-nav-menu" href="<@base />/config/passwordpolicy/forward/">
                 <@locale code="navs.conf.passwordpolicy"/>
                  <span class="fa fa-fw fa-balance-scale"></span>

+ 1 - 1
maxkey-web-maxkey/src/main/resources/application.properties

@@ -3,5 +3,5 @@ application.title=MaxKey
 application.name=MaxKey
 application.formatted-version=v2.7.0 GA
 
+spring.profiles.active=http
 #spring.profiles.active=http
-spring.profiles.active=https

+ 2 - 1
maxkey-web-maxkey/src/main/resources/maxkey.properties

@@ -2,9 +2,10 @@
 #                        MaxKey
 ############################################################################
 #                domain name configuration
+config.server.scheme=http
 config.server.basedomain=maxkey.top
 config.server.domain=sso.${config.server.basedomain}
-config.server.name=https://${config.server.domain}
+config.server.name=${config.server.scheme}://${config.server.domain}
 config.server.uri=${config.server.name}/maxkey
 #default.uri
 config.server.default.uri=${config.server.uri}/maxkey/appList