Commit 843cb1b1 authored by 李良停's avatar 李良停

Initial Commit

parents
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="masterDetails">
<states>
<state key="ProjectJDKs.UI">
<settings>
<last-edited>1.8</last-edited>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
</states>
</component>
</project>
\ No newline at end of file
# Default ignored files
/workspace.xml
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<annotationProcessing>
<profile name="Maven default annotation processors profile" enabled="true">
<sourceOutputDir name="target/generated-sources/annotations" />
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
<outputRelativeToContentRoot value="true" />
<module name="sh-authcenter-agent" />
<module name="sh-authcenter-log" />
</profile>
</annotationProcessing>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding">
<file url="file://$PROJECT_DIR$" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/sh-authcenter-agent" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/sh-authcenter-log" charset="UTF-8" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="FrameworkDetectionExcludesConfiguration">
<file type="web" url="file://$PROJECT_DIR$/sh-authcenter-agent" />
</component>
<component name="MavenProjectsManager">
<option name="originalFiles">
<list>
<option value="$PROJECT_DIR$/pom.xml" />
</list>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8.0_151" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.chineseall.authcenter</groupId>
<artifactId>sh-authcenter</artifactId>
<packaging>pom</packaging>
<version>1.0-SNAPSHOT</version>
<modules>
<module>sh-authcenter-agent</module>
<module>sh-authcenter-log</module>
</modules>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.16.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<spring-cloud.version>Dalston.SR4</spring-cloud.version>
<spring-version>4.3.19.RELEASE</spring-version>
<spring.version>4.3.19.RELEASE</spring.version>
<alpha-framework-version>2.0.6.0014</alpha-framework-version>
<spring-boot.version>1.5.16.RELEASE</spring-boot.version>
<mongodb.version>3.10.2</mongodb.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
<dependency>
<groupId>org.jolokia</groupId>
<artifactId>jolokia-core</artifactId>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>cn.sh.chineseall</groupId>
<artifactId>alpha-framework-api</artifactId>
</dependency>
<dependency>
<groupId>cn.sh.chineseall</groupId>
<artifactId>alpha-framework-springboot-bootstrap</artifactId>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>cn.sh.chineseall</groupId>
<artifactId>alpha-framework-api</artifactId>
<version>${alpha-framework-version}</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>cn.sh.chineseall</groupId>
<artifactId>alpha-framework-springboot-bootstrap</artifactId>
<version>${alpha-framework-version}</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>cn.sh.chineseall</groupId>
<artifactId>alpha-framework-core</artifactId>
<version>${alpha-framework-version}</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>cn.sh.chineseall</groupId>
<artifactId>alpha-framework-dao-mongo</artifactId>
<version>${alpha-framework-version}</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>cn.sh.chineseall</groupId>
<artifactId>alpha-framework-springboot-starter</artifactId>
<version>${alpha-framework-version}</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>1.2.6</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>1.1.1</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.chineseall</groupId>
<artifactId>base</artifactId>
<version>0.2</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
<exclusion>
<groupId>org.mybatis</groupId>
<artifactId>mybatis-spring</artifactId>
</exclusion>
<exclusion>
<groupId>org.mybatis</groupId>
<artifactId>mybatis</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.chineseall</groupId>
<artifactId>base-util</artifactId>
<version>0.2</version>
<exclusions>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
</exclusion>
<exclusion>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
</exclusion>
<exclusion>
<groupId>com.google.collections</groupId>
<artifactId>google-collections</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>cn.sh.chineseall</groupId>
<artifactId>alpha-framework-storage</artifactId>
<version>${alpha-framework-version}</version>
</dependency>
<dependency>
<groupId>org.quartz-scheduler</groupId>
<artifactId>quartz</artifactId>
<version>2.3.0</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
<exclusion>
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP-java6</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
<version>${spring-version}</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</dependencyManagement>
<!-- build管理器,子项目可选择性调用某一项build,如果不引入,则默认为maven compiler-->
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<testFailureIgnore>true</testFailureIgnore>
</configuration>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
<repositories>
<repository>
<id>public</id>
<url>http://180.167.91.206:5716/nexus/content/groups/public/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
<checksumPolicy>warn</checksumPolicy>
<updatePolicy>always</updatePolicy>
</snapshots>
</repository>
</repositories>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>sh-authcenter</artifactId>
<groupId>com.chineseall.authcenter</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>sh-authcenter-agent</artifactId>
<packaging>war</packaging>
<dependencies>
<dependency>
<groupId>cn.sh.chineseall</groupId>
<artifactId>alpha-framework-springboot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
<dependency>
<groupId>cn.sh.chineseall</groupId>
<artifactId>alpha-framework-core</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
</dependency>
<dependency>
<groupId>net.sourceforge.nekohtml</groupId>
<artifactId>nekohtml</artifactId>
<version>1.9.22</version>
</dependency>
<dependency>
<groupId>com.chineseall.authcenter</groupId>
<artifactId>sh-authcenter-log</artifactId>
<version>${project.version}</version>
</dependency>
<!--因配置外部TOMCAT 而配置-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4" />
\ No newline at end of file
package com.chineseall.authcenter.agent;
import cn.sh.chineseall.framework.starter.annotation.AlphaFrameworkApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.support.SpringBootServletInitializer;
import org.springframework.context.annotation.ComponentScan;
@AlphaFrameworkApplication
@ComponentScan(basePackages = {"com.chineseall.authcenter.agent", "com.chineseall.authcenter.log"})
public class EdenAuthcenterAgentApplication extends SpringBootServletInitializer {
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
return builder.sources(EdenAuthcenterAgentApplication.class);
}
public static void main(String[] args) {
cn.sh.chineseall.framework.springboot.bootstrap.application.AlphaFrameworkSpringApplication.run(EdenAuthcenterAgentApplication.class, args);
}
}
package com.chineseall.authcenter.agent.client;
import lombok.Data;
/**
* @author zhangjiaquan
*/
@Data
public class AuthUserInfo {
private String id;//uuid
private String realName;//姓名
private String loginName;//姓名
private String userType;//教师、学生
private String source;//来源
/**
* 学生
*/
private String studentId;//学生id
private String studentCode;//学籍号
private String studentStage;//学段
private String studentGrade;//年级
private String studentClass;//班级
private String studentStageName;//学段名称
private String studentGradeName;//年级名称
private String studentClassName;//班级名称
private String studentSchoolId;//学籍学校id
private String studentCodeStatus;//学籍当前状态
private String studentSchoolCode;//学籍学校代码
private String studentSchoolName;//学籍学校名称
private String studentRegionCode;//学籍区县代码
private String studentRegionName;//学籍区县名称
/**
* 教师
*/
private String teacherTrainingNo;//师训号
private String teacherCertificateNo;
private String teacherTrainingUserName;//师训用户名
private String teacherRegionCode;//师训区县id
private String teacherCampusCode;//师训学区id
private String teacherTrainingSchoolType;//师训学校类型
private String teacherStage;//师训学段id
private String teacherGrade;//师训年级id
private String teacherSubject;//师训专业
private String teacherSchoolId;//师训学校id
private String teacherSchoolName;//师训学校名称
}
package com.chineseall.authcenter.agent.client;
import com.chineseall.authcenter.agent.oauth.OauthType;
import lombok.Data;
@Data
public class ClientDataInfo {
private AuthUserInfo authUserInfo;
private String returnUrl;
private OauthType oauthType;
}
package com.chineseall.authcenter.agent.client;
import lombok.Data;
import java.io.Serializable;
/**
* Created by yuchunlin on 2019/5/28.
*/
@Data
public class ClientItem implements Serializable{
private String clientName;
private String clientId;
private String clientSecret;
private String loginSuccessUrl;
private String logoutSuccessUrl;
}
package com.chineseall.authcenter.agent.client;
import lombok.Getter;
/**
* @author liuyp
*/
public enum ClientUserType {
Student("1001","学生"),
Teacher("2001","老师"),
Mentor("2002","老师");
@Getter
private final String code;
@Getter
private final String description;
ClientUserType(String code, String description) {
this.code = code;
this.description = description;
}
public static ClientUserType getValue(String name) {
try {
return ClientUserType.valueOf(name);
} catch (Exception ex) {
return null;
}
}
}
package com.chineseall.authcenter.agent.client;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
import java.util.List;
/**
* Created by yuchunlin on 2019/5/28.
*/
@Data
@Component
@ConfigurationProperties(prefix = "oauthclient")
public class OauthClient {
private List<ClientItem> clients;
}
package com.chineseall.authcenter.agent.controller;
import cn.sh.chineseall.framework.core.util.StringUtils;
import com.alibaba.fastjson.JSON;
import com.chineseall.authcenter.agent.client.AuthUserInfo;
import com.chineseall.authcenter.agent.client.ClientDataInfo;
import com.chineseall.authcenter.agent.client.ClientItem;
import com.chineseall.authcenter.agent.client.OauthClient;
import com.chineseall.authcenter.agent.oauth.OauthConfig;
import com.chineseall.authcenter.agent.oauth.OauthConfigItem;
import com.chineseall.authcenter.agent.utils.CookiesUtil;
import com.chineseall.authcenter.agent.utils.EncodeUtil;
import com.chineseall.authcenter.log.enums.LogType;
import com.chineseall.authcenter.log.model.AuthLog;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import com.chineseall.authcenter.log.service.AuthLogService;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.net.URLEncoder;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
import java.util.function.Function;
import java.util.stream.Collectors;
@Controller
@RequestMapping("auth")
public class AuthController {
Logger logger = Logger.getLogger(AuthController.class);
@Autowired
private OauthClient oauthClient;
@Autowired
private OauthConfig oauthConfig;
@Resource
private AuthLogService authLogService;
private static final String COOKIE_LOGIN_TYPE = "col_login_type";
private static final String COOKIE_LOG_ID = "col_log_id";
/**
* 登陆入口
* @param request
* @param response
* @return
*/
@RequestMapping("login")
public ModelAndView index(HttpServletRequest request, HttpServletResponse response) {
ModelAndView modelAndView = new ModelAndView();
Map<String, ClientItem> clientItemMap = oauthClient.getClients().stream().collect(Collectors.toMap(ClientItem::getClientId, Function.identity()));
try {
String clientId = request.getParameter("client_id");
String returnUrl = request.getParameter("redirect_uri");
ClientItem clientItem = clientItemMap.get(clientId);
if (null == clientItem) {
modelAndView.setViewName("error");
modelAndView.addObject("message", "client_id为空或者不正确");
return modelAndView;
}
String sign = request.getParameter("sign");
String signOrigin = clientItem.getClientId() + "$$" + clientItem.getClientSecret();
String md5Hex = EncodeUtil.md5(signOrigin);
if (!Objects.equals(sign, md5Hex)) {
modelAndView.setViewName("error");
modelAndView.addObject("message", "请求不合法");
return modelAndView;
}
if (StringUtils.isEmpty(returnUrl)) {
modelAndView.setViewName("error");
modelAndView.addObject("message", "登录成功回调地址为空");
return modelAndView;
}
String loginType = request.getParameter("login_type");
if(loginType != null) {
CookiesUtil.setCookie(response, null, COOKIE_LOGIN_TYPE, loginType, 1);
}
AuthLog authLog = new AuthLog();
authLog.setLogType(LogType.login);
authLog.setReturnUrl(returnUrl);
authLog.setClientId(clientId);
authLog.setClientName(clientItemMap.get(clientId).getClientName());
authLogService.save(authLog);
CookiesUtil.setCookie(response, null, COOKIE_LOG_ID, authLog.getId(), 1);
Map<String, String> params = new HashMap<>();
params.put("redirect_uri", returnUrl);
params.put("auth_log_id", authLog.getId());
response.sendRedirect(appendUrl("/auth/index", params));
return null;
} catch (Exception e) {
e.printStackTrace();
modelAndView.setViewName("error");
modelAndView.addObject("message", "未知错误");
}
return modelAndView;
}
/**
* idp选择页面
* @param request
* @return
*/
@RequestMapping("/idp")
public ModelAndView auth(HttpServletRequest request, HttpServletResponse response){
ModelAndView mv = new ModelAndView("idp");
String loginType = CookiesUtil.getCookie(request, COOKIE_LOGIN_TYPE);
if(null != loginType) {
mv.addObject("loginType", loginType);
CookiesUtil.delCookie(response, null, null, COOKIE_LOGIN_TYPE, loginType);
}
return mv;
}
@RequestMapping("tologin")
public ModelAndView toLogin(HttpServletRequest request, HttpServletResponse response) {
ModelAndView modelAndView = new ModelAndView();
String loginUrl = request.getParameter("loginUrl");
String idp = request.getParameter("idp");
try {
String authLogId = CookiesUtil.getCookie(request, COOKIE_LOG_ID);
if(null != authLogId) {
AuthLog authLog = authLogService.getById(authLogId);
authLog.setIdp(idp);
authLogService.save(authLog);
CookiesUtil.delCookie(response, null, null, COOKIE_LOG_ID, authLogId);
}
response.sendRedirect(loginUrl);
return null;
} catch (Exception e) {
e.printStackTrace();
modelAndView.setViewName("error");
modelAndView.addObject("message", "跳转失败,请联系管理人员");
}
return modelAndView;
}
/**
* 登陆受保护地址+登陆成功回跳地址
* @param request
* @param response
* @param modelAndView
* @return
*/
@RequestMapping(value = "/index")
public ModelAndView loginsuccess(HttpServletRequest request, HttpServletResponse response, ModelAndView modelAndView) {
modelAndView.setViewName("loginsuccess");
String returnUrl = request.getParameter("redirect_uri");
String authLogId = request.getParameter("auth_log_id");
ClientDataInfo clientDataInfo = getUserInfoData(request);
AuthLog authLog = authLogService.getById(authLogId);
authLog.setLoginSuccessFlag(true);
if(clientDataInfo!=null && clientDataInfo.getAuthUserInfo()!=null){
authLog.setUserInfoMap(JSON.parseObject(JSON.toJSONString(clientDataInfo.getAuthUserInfo()), Map.class));
}
String shibProvider = (String) request.getAttribute("Shib-Identity-Provider");
authLog.setShibProvider(shibProvider);
authLogService.save(authLog);
modelAndView.addObject("successPostUrl", returnUrl);
modelAndView.addObject("clientDataInfo", clientDataInfo);
return modelAndView;
}
private ClientDataInfo getUserInfoData(HttpServletRequest request){
ClientDataInfo clientDataInfo = new ClientDataInfo();
clientDataInfo.setReturnUrl(request.getParameter("redirect_uri"));
AuthUserInfo authUserInfo = new AuthUserInfo();
authUserInfo.setLoginName(toUtf8(request.getAttribute("uid")));
authUserInfo.setRealName(toUtf8(request.getAttribute("cn")));
authUserInfo.setId(toUtf8(request.getAttribute("uid")));
clientDataInfo.setAuthUserInfo(authUserInfo);
return clientDataInfo;
}
private String toUtf8(Object ob){
if(ob==null){
return null;
}else{
try{
String s = (String) ob;
if(s.equals(new String(s.getBytes("iso8859-1"),"iso8859-1"))){
return new String(s.getBytes("iso8859-1"),"utf-8");
}else{
return s;
}
}catch (Exception e){
e.printStackTrace();
return null;
}
}
}
@RequestMapping("logout")
public ModelAndView logout(HttpServletRequest request, HttpServletResponse response) {
ModelAndView modelAndView = new ModelAndView();
modelAndView.setViewName("logout");
Map<String, ClientItem> clientItemMap = oauthClient.getClients().stream().collect(Collectors.toMap(ClientItem::getClientId, Function.identity()));
try {
String clientId = request.getParameter("client_id");
ClientItem clientItem = clientItemMap.get(clientId);
if (clientItem == null) {
modelAndView.setViewName("error");
modelAndView.addObject("message", "client_id为空或者不正确");
return modelAndView;
}
String sign = request.getParameter("sign");
String signOrigin = clientItem.getClientId() + "$$" + clientItem.getClientSecret();
String md5Hex = EncodeUtil.md5(signOrigin);
if (!Objects.equals(sign, md5Hex)) {
modelAndView.setViewName("error");
modelAndView.addObject("message", "请求不合法");
return modelAndView;
}
String service = request.getParameter("service");
if (StringUtils.isEmpty(service)) {
modelAndView.setViewName("error");
modelAndView.addObject("message", "登出成功回调地址为空");
return modelAndView;
}
AuthLog authLog = new AuthLog();
authLog.setLogType(LogType.logout);
authLog.setReturnUrl(service);
authLog.setClientId(clientId);
authLog.setClientName(clientItem.getClientName());
authLogService.save(authLog);
response.sendRedirect("/Shibboleth.sso/Logout?return="+URLEncoder.encode(service));
} catch (Exception e) {
e.printStackTrace();
modelAndView.setViewName("error");
modelAndView.addObject("message", "未知错误");
}
return modelAndView;
}
private String generateLoginUrl(String returnUrl, String oauthType, String logId) {
//oauthConfig + "/authorize?client_id=testClentId&redirect_uri=http%3a%2f%2f192.168.17.129%3a7774%2fauth%2floginsuccess.do&state=state"
StringBuilder loginUrlBuilder = new StringBuilder();
OauthConfigItem oauthConfigItem = oauthConfig.getItems().get(oauthType);
loginUrlBuilder.append(oauthConfigItem.getOauthUrl());
if (!oauthConfigItem.getOauthUrl().endsWith("/")) {
loginUrlBuilder.append("/");
}
loginUrlBuilder.append("oauth2.0/authorize?client_id=").append(oauthConfigItem.getClientId());
String loginSuccessUrl = oauthConfigItem.getLoginSuccessUrl();
loginSuccessUrl = loginSuccessUrl + "?oauth_type=" + oauthType + "&log_id=" + logId;
if (StringUtils.isNotEmpty(returnUrl)) {
Map<String, String> param = new HashMap<>();
param.put("return_url", URLEncoder.encode(returnUrl));
loginSuccessUrl = appendUrl(loginSuccessUrl, param);
}
loginUrlBuilder.append("&redirect_uri=").append(URLEncoder.encode(loginSuccessUrl));
loginUrlBuilder.append("&state=state&response_type=code");
return loginUrlBuilder.toString();
}
private String generateLogoutUrl(String returnUrl, String oauthType) {
//oauthConfig + "/authorize?client_id=testClentId&redirect_uri=http%3a%2f%2f192.168.17.129%3a7774%2fauth%2floginsuccess.do&state=state"
StringBuilder loginUrlBuilder = new StringBuilder();
OauthConfigItem oauthConfigItem = oauthConfig.getItems().get(oauthType);
loginUrlBuilder.append(oauthConfigItem.getOauthUrl());
if (!oauthConfigItem.getOauthUrl().endsWith("/")) {
loginUrlBuilder.append("/");
}
String service = oauthConfigItem.getLogoutSuccessUrl();
if (StringUtils.isNotEmpty(returnUrl)) {
Map<String, String> param = new HashMap<>();
param.put("return_url", URLEncoder.encode(returnUrl));
service = appendUrl(service, param);
}
loginUrlBuilder.append("logout?service=").append(URLEncoder.encode(service));
return loginUrlBuilder.toString();
}
private String generateUserInfoUrl(String accessToken, String oauthType) {
//String url = "http://castest.edu.sh.cn/CAS/oauth2.0/accessToken?client_id=testClentId&client_secret=testClientSecret&redirect_uri=http%3a%2f%2f192.168.17.129%3a7774%2fauth%2floginsuccess2.do&code=" + code;
StringBuilder builder = new StringBuilder();
OauthConfigItem oauthConfigItem = oauthConfig.getItems().get(oauthType);
builder.append(oauthConfigItem.getOauthUrl());
if (!oauthConfigItem.getOauthUrl().endsWith("/")) {
builder.append("/");
}
builder.append("oauth2.0/profile?access_token=").append(accessToken);
return builder.toString();
}
private String generateAccessTokenUrl(String code, String oauthType) {
//String url = "http://castest.edu.sh.cn/CAS/oauth2.0/accessToken?client_id=testClentId&client_secret=testClientSecret&redirect_uri=http%3a%2f%2f192.168.17.129%3a7774%2fauth%2floginsuccess2.do&code=" + code;
StringBuilder builder = new StringBuilder();
OauthConfigItem oauthConfigItem = oauthConfig.getItems().get(oauthType);
builder.append(oauthConfigItem.getOauthUrl());
if (!oauthConfigItem.getOauthUrl().endsWith("/")) {
builder.append("/");
}
builder.append("oauth2.0/accessToken?client_id=").append(oauthConfigItem.getClientId());
builder.append("&client_secret=").append(oauthConfigItem.getClientSecret());
builder.append("&code=").append(code);
builder.append("&redirect_uri=").append(oauthConfigItem.getLoginSuccessUrl());
builder.append("&grant_type=authorization_code");
return builder.toString();
}
/**
* 在指定url后追加参数
*
* @param url
* @param data 参数集合 key = value
* @return
*/
private static String appendUrl(String url, Map<String, String> data) {
String newUrl = url;
StringBuffer param = new StringBuffer();
for (String key : data.keySet()) {
param.append(key + "=" + data.get(key) + "&");
}
String paramStr = param.toString();
paramStr = paramStr.substring(0, paramStr.length() - 1);
if (newUrl.indexOf("?") >= 0) {
newUrl += "&" + paramStr;
} else {
newUrl += "?" + paramStr;
}
return newUrl;
}
}
package com.chineseall.authcenter.agent.controller;
import cn.sh.chineseall.framework.core.util.StringUtils;
import com.alibaba.fastjson.JSON;
import com.chineseall.authcenter.agent.client.ClientDataInfo;
import com.chineseall.authcenter.agent.utils.EncodeUtil;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.net.URLEncoder;
@Controller
@RequestMapping("sample")
public class SampleController {
// 认证系统提供client_id
private static final String CLIENT_ID = "jsydClentId";
// 认证系统提供client_secret
private static final String CLIENT_SECRET = "jsydClientSecret";
// 登录地址
private static final String LOGIN_URL = "https://sp.etextbook.cn/authcenter/auth/login";
// 登出地址
private static final String LOGOUT_URL = "https://sp.etextbook.cn/authcenter/auth/logout";
// 登录回调地址
private static final String LOGIN_SUCCESS_URL = "https://sp.etextbook.cn/authcenter/sample/loginsuccess";
// 登出回调地址
private static final String LOGOUT_SUCCESS_URL = "https://sp.etextbook.cn/authcenter/sample/logoutsuccess";
@RequestMapping("login")
public ModelAndView login(HttpServletRequest request, HttpServletResponse response) {
ModelAndView modelAndView = new ModelAndView();
try {
String loginType = request.getParameter("login_type");
String sign = EncodeUtil.md5(CLIENT_ID + "$$" + CLIENT_SECRET);
String loginUrl = LOGIN_URL + "?client_id=" + CLIENT_ID + "&sign=" + sign + "&redirect_uri=" + URLEncoder.encode(LOGIN_SUCCESS_URL);
if(loginType!=null){
loginUrl = loginUrl + "&login_type=" + loginType;
}
response.sendRedirect(loginUrl);
return null;
} catch (IOException e) {
e.printStackTrace();
}
return modelAndView;
}
@RequestMapping("logout")
public ModelAndView logout(HttpServletRequest request, HttpServletResponse response) {
ModelAndView modelAndView = new ModelAndView();
try {
String sign = EncodeUtil.md5(CLIENT_ID + "$$" + CLIENT_SECRET);
String loginUrl = LOGOUT_URL + "?client_id=" + CLIENT_ID + "&sign=" + sign + "&service="
+ URLEncoder.encode(LOGOUT_SUCCESS_URL) ;
response.sendRedirect(loginUrl);
return null;
} catch (IOException e) {
e.printStackTrace();
}
return modelAndView;
}
@RequestMapping("loginsuccess")
@ResponseBody
public String loginsuccess(ClientDataInfo clientDataInfo) {
return JSON.toJSONString(clientDataInfo);
}
@RequestMapping("logoutsuccess")
@ResponseBody
public String logoutsuccess(ClientDataInfo clientDataInfo) {
return "登出成功!";
}
}
package com.chineseall.authcenter.agent.oauth;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
import java.io.Serializable;
import java.util.Map;
@Data
@Component
@ConfigurationProperties(prefix = "oauth")
public class OauthConfig implements Serializable {
Map<String,OauthConfigItem> items;
}
package com.chineseall.authcenter.agent.oauth;
import lombok.Data;
import java.io.Serializable;
/**
* Created by yuchunlin on 2019/1/3.
*/
@Data
public class OauthConfigItem implements Serializable {
//http://castest.edu.sh.cn/CAS/oauth2.0
private String oauthUrl;
private String clientId;
private String clientSecret;
private String loginSuccessUrl;
private String logoutSuccessUrl;
}
package com.chineseall.authcenter.agent.oauth;
import lombok.Getter;
public enum OauthType {
dianjiaoguan("dianjiaoguan","电教馆账号认证"),
edenoperation("edenoperation","数字教材账号认证");
@Getter
private final String code;
@Getter
private final String description;
OauthType(String code, String description) {
this.code = code;
this.description = description;
}
public static OauthType getValue(String name) {
try {
return OauthType.valueOf(name);
} catch (Exception ex) {
return null;
}
}
}
package com.chineseall.authcenter.agent.utils;
import cn.sh.chineseall.framework.core.repackaged.org.apache.commons.lang3.StringUtils;
import com.chineseall.authcenter.agent.client.AuthUserInfo;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
public class ConvertMessageMapToBean {
public static AuthUserInfo converDianjiaoguanData(Map<String, Object> dataMap){
List<Map<String, String>> attributes = (List<Map<String, String>>) dataMap.get("attributes");
Map<String, String> map = new LinkedHashMap<>();
if(null != attributes) {
attributes.stream().forEach(stringMap -> {
for (Map.Entry entry : stringMap.entrySet()) {
map.put(entry.getKey().toString(), entry.getValue().toString());
}
});
}
AuthUserInfo authUserInfo = new AuthUserInfo();
if(StringUtils.isNotBlank(map.get("ID")))
authUserInfo.setId(map.get("ID").toString());
if(StringUtils.isNotBlank(map.get("XM")))
authUserInfo.setRealName(map.get("XM").toString());
if(StringUtils.isNotBlank(map.get("ROLE"))) {
}
if(StringUtils.isNotBlank(map.get("XJXSID")))
authUserInfo.setStudentId(map.get("XJXSID").toString());
if(StringUtils.isNotBlank(map.get("XJFH")))
authUserInfo.setStudentCode(map.get("XJFH").toString());
if(StringUtils.isNotBlank(map.get("XJXD"))) {
}
if(StringUtils.isNotBlank(map.get("XJNJ"))){
}
if(StringUtils.isNotBlank(map.get("XJBJ")))
authUserInfo.setStudentClass(map.get("XJBJ").toString());
if(authUserInfo.getStudentStage() != null)
if(authUserInfo.getStudentGrade() != null)
if(StringUtils.isNotBlank(map.get("XJBJMC")))
authUserInfo.setStudentClassName(map.get("XJBJMC").toString());
if(StringUtils.isNotBlank(map.get("XJXXID")))
authUserInfo.setStudentSchoolId(map.get("XJXXID").toString());
if(StringUtils.isNotBlank(map.get("XJDQZT")))
authUserInfo.setStudentCodeStatus(map.get("XJDQZT").toString());
if(StringUtils.isNotBlank(map.get("XJXXDM")))
authUserInfo.setStudentSchoolCode(map.get("XJXXDM").toString());
if(StringUtils.isNotBlank(map.get("XJXXMC")))
authUserInfo.setStudentSchoolName(map.get("XJXXMC").toString());
if(StringUtils.isNotBlank(map.get("XJQXDM")))
authUserInfo.setStudentRegionCode(map.get("XJQXDM").toString());
if(StringUtils.isNotBlank(map.get("XJQXMC")))
authUserInfo.setStudentRegionName(map.get("XJQXMC").toString());
if(StringUtils.isNotBlank(map.get("SXTEACHNUMBER")))
authUserInfo.setTeacherTrainingNo(map.get("SXTEACHNUMBER").toString());
if(StringUtils.isNotBlank(map.get("SXENAME")))
authUserInfo.setTeacherTrainingUserName(map.get("SXENAME").toString());
if(StringUtils.isNotBlank(map.get("SXQUXIANID")))
authUserInfo.setTeacherRegionCode(map.get("SXQUXIANID").toString());
if(StringUtils.isNotBlank(map.get("SXXUQUID")))
authUserInfo.setTeacherCampusCode(map.get("SXXUQUID").toString());
if(StringUtils.isNotBlank(map.get("SXSCHOOL_TYPEID")))
authUserInfo.setTeacherTrainingSchoolType(map.get("SXSCHOOL_TYPEID").toString());
if(StringUtils.isNotBlank(map.get("SXXUEDUANID"))){
}
if(StringUtils.isNotBlank(map.get("SXNIANJIID"))){
}
if(StringUtils.isNotBlank(map.get("SXMASTERSUBJECT"))) {
}
if(StringUtils.isNotBlank(map.get("SXSCHOOLID")))
authUserInfo.setTeacherSchoolId(map.get("SXSCHOOLID").toString());
if(StringUtils.isNotBlank(map.get("SXSCHOOL_NAME")))
authUserInfo.setTeacherSchoolName(map.get("SXSCHOOL_NAME").toString());
return authUserInfo;
}
public static AuthUserInfo converEdenoperationData(Map<String, Object> dataMap){
Map<String, String> map = (Map<String, String>) dataMap.get("authUserInfo");
AuthUserInfo authUserInfo = new AuthUserInfo();
if(StringUtils.isNotBlank(map.get("id")))
authUserInfo.setId(map.get("id").toString());
if(StringUtils.isNotBlank(map.get("real_name")))
authUserInfo.setRealName(map.get("real_name").toString());
if(StringUtils.isNotBlank(map.get("user_type")))
if(StringUtils.isNotBlank(map.get("student_id")))
authUserInfo.setStudentId(map.get("student_id").toString());
if(StringUtils.isNotBlank(map.get("student_code")))
authUserInfo.setStudentCode(map.get("student_code").toString());
if(StringUtils.isNotBlank(map.get("student_stage")))
if(StringUtils.isNotBlank(map.get("student_grade")))
if(StringUtils.isNotBlank(map.get("student_class")))
if(StringUtils.isNotBlank(map.get("student_stage_name")))
authUserInfo.setStudentStageName(map.get("student_stage_name").toString());
if(authUserInfo.getStudentGrade() != null)
if(StringUtils.isNotBlank(map.get("student_class_name")))
authUserInfo.setStudentClassName(map.get("student_class_name").toString());
if(StringUtils.isNotBlank(map.get("student_school_id")))
authUserInfo.setStudentSchoolId(map.get("student_school_id").toString());
if(StringUtils.isNotBlank(map.get("student_code_status")))
authUserInfo.setStudentCodeStatus(map.get("student_code_status").toString());
if(StringUtils.isNotBlank(map.get("student_school_code")))
authUserInfo.setStudentSchoolCode(map.get("student_school_code").toString());
if(StringUtils.isNotBlank(map.get("student_school_name")))
authUserInfo.setStudentSchoolName(map.get("student_school_name").toString());
if(StringUtils.isNotBlank(map.get("student_region_code")))
authUserInfo.setStudentRegionCode(map.get("student_region_code").toString());
if(StringUtils.isNotBlank(map.get("student_region_name")))
authUserInfo.setStudentRegionName(map.get("student_region_name").toString());
if(StringUtils.isNotBlank(map.get("teacher_training_no")))
authUserInfo.setTeacherTrainingNo(map.get("teacher_training_no").toString());
if(StringUtils.isNotBlank(map.get("teacher_training_user_name")))
authUserInfo.setTeacherTrainingUserName(map.get("teacher_training_user_name").toString());
if(StringUtils.isNotBlank(map.get("teacher_region_code")))
authUserInfo.setTeacherRegionCode(map.get("teacher_region_code").toString());
if(StringUtils.isNotBlank(map.get("teacher_campus_code")))
authUserInfo.setTeacherCampusCode(map.get("teacher_campus_code").toString());
if(StringUtils.isNotBlank(map.get("teacher_training_school_type")))
authUserInfo.setTeacherTrainingSchoolType(map.get("teacher_training_school_type").toString());
if(StringUtils.isNotBlank(map.get("teacher_stage")))
if(StringUtils.isNotBlank(map.get("teacher_grade")))
if(StringUtils.isNotBlank(map.get("teacher_subject")))
if(StringUtils.isNotBlank(map.get("teacher_school_id")))
authUserInfo.setTeacherSchoolId(map.get("teacher_school_id").toString());
if(StringUtils.isNotBlank(map.get("teacher_school_name")))
authUserInfo.setTeacherSchoolName(map.get("teacher_school_name").toString());
return authUserInfo;
}
}
package com.chineseall.authcenter.agent.utils;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public class CookiesUtil {
public static String getSessionId(HttpServletRequest request) {
String sessionId = request.getParameter("JSESSIONID");
if (sessionId == null) {
return getCookie(request, "JSESSIONID");
}
return sessionId;
}
public static String getCookie(HttpServletRequest request, String cookieName) {
Cookie[] cookies = request.getCookies();
String str = null;
if (cookies != null) {
for (int i = 0; i < cookies.length; i++) {
Cookie c = cookies[i];
if (c.getName().equalsIgnoreCase(cookieName)) {
str = c.getValue();
}
}
}
return str;
}
public static void setCookie(HttpServletResponse response, String domain,
String cookieName, String cookieValue, Integer days) {
Cookie cookies = null;
cookies = new Cookie(cookieName, cookieValue);
if (days != null) {
cookies.setMaxAge(60 * 60 * 24 * days);
}
cookies.setPath("/");
if (domain != null) {
cookies.setDomain(domain);
}
response.addCookie(cookies);
}
public static void delCookie(HttpServletResponse response, String domain,
String path, String cookieName, String cookieValue) {
Cookie cookies = new Cookie(cookieName, cookieValue);
if (domain != null) {
cookies.setDomain(domain);
}
cookies.setPath(path);
cookies.setMaxAge(0);
response.addCookie(cookies);
}
public static void delAllCookie(HttpServletRequest request,
HttpServletResponse response) {
Cookie[] cookies = request.getCookies();
if (cookies != null) {
for (int i = 0; i < cookies.length; i++) {
Cookie c = cookies[i];
c.setValue("");
c.setMaxAge(0);
response.addCookie(c);
}
}
}
}
package com.chineseall.authcenter.agent.utils;
import org.apache.commons.codec.binary.Base64;
import org.apache.commons.codec.digest.DigestUtils;
import javax.crypto.*;
import javax.crypto.spec.DESKeySpec;
import javax.crypto.spec.SecretKeySpec;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.security.InvalidKeyException;
import java.security.Key;
import java.security.NoSuchAlgorithmException;
import java.security.spec.InvalidKeySpecException;
public class EncodeUtil {
private static final String charset = "utf-8";
private static final String KEY_ALGORITHM = "AES";
private static final String CIPHER_ALGORITHM = "AES/ECB/PKCS5Padding";
private static final String key = "ChineseAllShanghai!@#$%^&*()";
public static String encodePassword(String originPassword) {
return EncodeUtil.base64Encode(
EncodeUtil.md5(originPassword + key), "UTF-8").trim();
}
/**
* 根据指定的字符串生成密钥
* @param len 密钥长度;支持128、192、256三种长度,本项目采用128位。
*
* @return String 密钥
*/
public static String getKey(String key, int len) throws Exception {
if (len != 128 && len != 192 && len != 256)
return null;
key = EncodeUtil.md5(key);
key = key.substring(0, len / 8);
byte[] kb = key.getBytes(charset);
key = EncodeUtil.encodeBase64(kb);
return key;
}
private static Key toKey(byte[] key)
{
return new SecretKeySpec(key, KEY_ALGORITHM);
}
public static String encrypt(String data, String key) throws Exception
{
//Key k = toKey(Base64.decode(key));
Key k = toKey(EncodeUtil.decodeBase64(key).getBytes(charset));
Cipher cipher = Cipher.getInstance(CIPHER_ALGORITHM);
cipher.init(Cipher.ENCRYPT_MODE, k);
String content = parseByte2HexStr(Base64.encodeBase64((cipher.doFinal(data.getBytes(charset)))));
return content;
}
public static String decrypt(String data, String key) throws Exception
{
Key k = toKey(EncodeUtil.decodeBase64(key).getBytes(charset));
Cipher cipher = Cipher.getInstance(CIPHER_ALGORITHM);
cipher.init(Cipher.DECRYPT_MODE, k);
String content = new String(cipher.doFinal(Base64.decodeBase64(parseHexStr2Byte(data))), charset);
return content;
}
/**将16进制转换为二进制
* @param hexStr
* @return
*/
public static byte[] parseHexStr2Byte(String hexStr) {
if (hexStr.length() < 1)
return null;
byte[] result = new byte[hexStr.length()/2];
for (int i = 0;i< hexStr.length()/2; i++) {
int high = Integer.parseInt(hexStr.substring(i*2, i*2+1), 16);
int low = Integer.parseInt(hexStr.substring(i*2+1, i*2+2), 16);
result[i] = (byte) (high * 16 + low);
}
return result;
}
/**将二进制转换成16进制
* @param buf
* @return
*/
public static String parseByte2HexStr(byte buf[]) {
StringBuffer sb = new StringBuffer();
for (int i = 0; i < buf.length; i++) {
String hex = Integer.toHexString(buf[i] & 0xFF);
if (hex.length() == 1) {
hex = '0' + hex;
}
sb.append(hex.toUpperCase());
}
return sb.toString();
}
/**
* 传入字符串,返回一个加密串
*
* @param s
* @return
*/
public static String encode(String s , String key) {
try {
byte[] encryptedData = encrypt(s , HEXStringToByte(key));
s = byteToHEXString(encryptedData);
} catch (Exception e) {
e.printStackTrace();
}
return s;
}
/**
* 传入加密串,返回解密串
*
* @param s
* @return
*/
public static String decode(String s , String key) {
try {
return decrypt(HEXStringToByte(s) , HEXStringToByte(key));
} catch (Exception e) {
}
return s;
}
/**
* 传入字符串,返回一个加密串
*
* @param s
* @return
*/
public static String encodeBase64(String s) {
byte[] binaryData = null;
try {
binaryData = s.getBytes("utf-8");
} catch (UnsupportedEncodingException e) {
return s;
}
// byte[] newbt = Base64.encodeBase64(binaryData);
return encodeBase64(binaryData);// new String(newbt);
}
public static String encodeBase64(byte[] binaryData) {
byte[] newbt = Base64.encodeBase64(binaryData);
return new String(newbt);
}
public static byte[] enBase64(byte[] binaryData) {
return Base64.encodeBase64(binaryData);
}
public static byte[] deBase64(byte[] bytes) throws IOException {
return Base64.decodeBase64(bytes);
}
public static String stringEncode(String str) {
try {
return java.net.URLEncoder.encode(str, "utf-8");
} catch (UnsupportedEncodingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return str;
}
/**
* 传入加密串,返回解密串
*
* @param s
* @return
*/
public static String decodeBase64(String s) {
try {
return decodeBase64(s.getBytes("utf-8"));
} catch (UnsupportedEncodingException e) {
return s;
}
}
public static String decodeBase64(byte[] bytes) {
byte[] oldbt = null;
String t = null;
try {
oldbt = Base64.decodeBase64(bytes);
t = new String(oldbt, "utf-8");
} catch (UnsupportedEncodingException e) {
}
return t;
}
public static String byteToHEXString(byte[] bArray) {
StringBuilder sb = new StringBuilder(100);
for (int i = 0; i < bArray.length; i++) {
String hex = Integer.toHexString(bArray[i] & 0xff);
if (hex.length() == 1) {
sb.append("0").append(hex);
} else {
sb.append(hex);
}
}
return sb.toString().toUpperCase();
}
public static byte[] HEXStringToByte(String strString) {
byte[] ret = new byte[strString.length() / 2];
for (int i = 0; i < ret.length; i++) {
ret[i] = Integer
.decode("#" + strString.substring(2 * i, 2 * i + 2))
.byteValue();
}
return ret;
}
/**
* 加密方法
*
* @param rawKeyData
* @param str
* @return
* @throws InvalidKeyException
* @throws NoSuchAlgorithmException
* @throws IllegalBlockSizeException
* @throws BadPaddingException
* @throws NoSuchPaddingException
* @throws InvalidKeySpecException
* @throws UnsupportedEncodingException
*/
public static byte[] encrypt(String str , byte [] rawKeyData) throws InvalidKeyException,
NoSuchAlgorithmException, IllegalBlockSizeException,
BadPaddingException, NoSuchPaddingException,
InvalidKeySpecException, UnsupportedEncodingException {
// DES算法要求有一个可信任的随机数源
// SecureRandom sr = new SecureRandom();
// 从原始密匙数据创建一个DESKeySpec对象
DESKeySpec dks = new DESKeySpec(rawKeyData);
// 创建一个密匙工厂,然后用它把DESKeySpec转换成一个SecretKey对象
SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("DES");
SecretKey key = keyFactory.generateSecret(dks);
// Cipher对象实际完成加密操作
Cipher cipher = Cipher.getInstance("DES");
// 用密匙初始化Cipher对象
cipher.init(Cipher.ENCRYPT_MODE, key);
// 现在,获取数据并加密
byte data[] = str.getBytes("utf-8");
// 正式执行加密操作
byte[] encryptedData = cipher.doFinal(data);
return encryptedData;
}
/**
* 解密方法
*
* @param rawKeyData
* @param encryptedData
* @throws IllegalBlockSizeException
* @throws BadPaddingException
* @throws InvalidKeyException
* @throws NoSuchAlgorithmException
* @throws NoSuchPaddingException
* @throws InvalidKeySpecException
* @throws UnsupportedEncodingException
*/
public static String decrypt(byte[] encryptedData , byte[] rawKeyData)
throws IllegalBlockSizeException, BadPaddingException,
InvalidKeyException, NoSuchAlgorithmException,
NoSuchPaddingException, InvalidKeySpecException,
UnsupportedEncodingException {
// DES算法要求有一个可信任的随机数源
// SecureRandom sr = new SecureRandom();
// 从原始密匙数据创建一个DESKeySpec对象
DESKeySpec dks = new DESKeySpec(rawKeyData);
// 创建一个密匙工厂,然后用它把DESKeySpec对象转换成一个SecretKey对象
SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("DES");
SecretKey key = keyFactory.generateSecret(dks);
// Cipher对象实际完成解密操作
Cipher cipher = Cipher.getInstance("DES");
// 用密匙初始化Cipher对象
cipher.init(Cipher.DECRYPT_MODE, key);
// 正式执行解密操作
byte decryptedData[] = cipher.doFinal(encryptedData);
return new String(decryptedData, "utf-8");
}
public String getCurrentMillyTime() {
return Long.valueOf(System.currentTimeMillis()).toString();
}
public static String md5(String content) {
return DigestUtils.md5Hex(content);
}
public static String sha(String content) {
return DigestUtils.shaHex(content);
}
public static String base64Encode(String content, String charset) {
byte[] bytes = null;
try {
bytes = Base64.encodeBase64(content.getBytes(charset), true);
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
return new String(bytes);
}
public static String base64Decode(String content, String charset) {
byte[] bytes = null;
try {
bytes = Base64.decodeBase64(content.getBytes(charset));
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
return new String(bytes);
}
}
server:
port: 9600
context-path: /authcenter
spring:
application:
name: eden-authcenter-agent
mvc:
static-path-pattern: /static/**
thymeleaf:
cache: false
prefix: classpath:/templates/
suffix: .html
mode: LEGACYHTML5
encoding: UTF-8
enabled: true
content-type: text/html
jackson:
property-naming-strategy: CAMEL_CASE_TO_LOWER_CASE_WITH_UNDERSCORES
default-property-inclusion: non_null
serialization: true
date-format: yyyy-MM-dd HH:mm:ss
time-zone: GMT+8
http:
multipart:
max-file-size: 200MB
max-request-size: 300MB
oauth:
items:
dianjiaoguan: #电教馆
#oauthUrl: https://castest.edu.sh.cn/CAS
oauthUrl: https://cas2.edu.sh.cn/CAS
clientId: clientid
clientSecret: clientSecret
loginSuccessUrl: https://ds.etextbook.cn/authcenter/auth/loginsuccess
logoutSuccessUrl: https://ds.etextbook.cn/authcenter/auth/logoutsuccess
edenoperation: #运营中心
#oauthUrl: https://operator-api-test.etextbook.cn/cas
oauthUrl: https://operator-api.sh-genius.cn/cas/
clientId: testClentId
clientSecret: testClientSecret
loginSuccessUrl: https://ds.etextbook.cn/authcenter/auth/loginsuccess
logoutSuccessUrl: https://ds.etextbook.cn/authcenter/auth/logoutsuccess
oauthclient:
clients:
- clientName: 金山阅读
clientId: jsydClentId
clientSecret: jsydClientSecret
- clientName: 接入样例
clientId: testClentId2
clientSecret: testClientSecret2
{
"mongo": [
{
"connectionName": "mongo",
"host": "dds-uf6124f9044c34741.mongodb.rds.aliyuncs.com",
"port": 3717,
"replicaSet": "dds-uf6124f9044c34741.mongodb.rds.aliyuncs.com:3717",
"maxConnectionsPerHost": 3000,
"threadsAllowedToBlockForConnectionMultiplier": 10,
"authentication": true,
"connectTimeout": 10000,
"password": "ChineseAll&0219",
"userName": "spuser",
"dbName": "splog"
}
],
"mongotest": [
{
"connectionName": "mongo",
"host": "localhost",
"port": 27017,
"replicaSet": "localhost:27017",
"maxConnectionsPerHost": 3000,
"threadsAllowedToBlockForConnectionMultiplier": 10,
"authentication": false,
"connectTimeout": 10000,
"password": "123456",
"userName": "root",
"dbName": "dslog"
}
]
}
\ No newline at end of file
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big,
cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl,
dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, thead, tr, th, td, header {
margin: 0;
padding: 0;
border: 0;
}
ul li{ list-style:none;}
a{ text-decoration:none; outline:none;}
h1, h2, h3, h4 {
font-weight:normal;
}
html{
font-size:14px;
font-family:"Microsoft Yahei","微软雅黑"; color:#323232;
}
ul li{ list-style:none; margin: 0; padding: 0; border: 0;}
a{ text-decoration:none; -webkit-tap-highlight-color: transparent; }
.fl{ float:left; display:inline;}
.fr{ float:right; display:inline;}
.none{ display:none;}
.clearfix{overflow:hidden;_zoom:1;}
.clear{ clear:both;}
::-webkit-input-placeholder { /* WebKit browsers */
font-size:14px;
color:#c1c1c1;
font-family:"Microsoft Yahei","微软雅黑";
}
:-moz-placeholder { /* Mozilla Firefox 4 to 18 */
font-size:14px;
color:#c1c1c1;
font-family:"Microsoft Yahei","微软雅黑";
}
::-moz-placeholder { /* Mozilla Firefox 19+ */
font-size:14px;
color:#c1c1c1;
font-family:"Microsoft Yahei","微软雅黑";
}
:-ms-input-placeholder { /* Internet Explorer 10+ */
font-size:14px;
color:#c1c1c1;
font-family:"Microsoft Yahei","微软雅黑";
}
.top{ width:100%; height:115px; border-top:solid 5px #87abe0;}
.main{ width:1070px; height:auto; margin-left:auto; margin-right:auto;}
.bottom{ width:100%; height:239px; background:#fff url(../images/Login-b.jpg) no-repeat top center; }
.pbottom{ position:absolute; bottom:0px;}
.bottom > p{ color:#aab9c5; font-size:12px; line-height:75px; text-align:center; }
.login-c{ width:100%; height:603px; background:url(../images/login-bg.jpg) no-repeat center center;}
.login-list{ padding-top:95px; padding-left:62px; }
ul.login-list-ul{ width:442px; height:285px; padding-left:30px; padding-top:25px; background:url(../images/login-list-bg.png) no-repeat top left;}
ul.login-list-ul > li > a{ padding-left:26px; width:416px; display:block; height:35px; line-height:35px; background:url(../images/li-icon.png) no-repeat left center; color:#313131; font-size:14px; }
ul.login-list-ul > li > a:hover{ text-decoration:underline;}
.login-form{ background-color:#fbfbfb; border-radius:3px; box-shadow:0px 0px 3px rgba(0,0,0,.15); width:270px; margin-top:90px;}
.login-form-h2{ border-bottom:solid 1px #f2f2f2; text-align:center; color:#565656; font-size:16px; line-height:55px; }
.login-form-tip{ background:url(../images/tip-tline.jpg) repeat-x top left; padding-top:16px; padding-bottom:20px; width:260px; margin-left:auto; margin-right:auto; }
.login-form-tip > p{ color:#9b9b9b; font-size:12px; -webkit-transform:scale(0.95,0.95) ; *font-size:11px; line-height:1.8em;}
.login-form-tip > p > a{ color:#5c5c5b; text-decoration:underline;}
.login-jump{height:110px; padding-top:50px; padding-bottom:50px;}
dl.jump-select-dl{ width:213px; height:38px; border:solid 1px #c1c1c1; margin-left:auto; margin-right:auto;}
dl.jump-select-dl dt{ width:37px; height:28px; padding-top:5px; padding-bottom:5px; float:left; display:inline; background:url(../images/user.png) no-repeat center center;}
dl.jump-select-dl > dt >span{ display:block; width:36px; height:28px; border-right:solid 1px #c1c1c1;}
dl.jump-select-dl dd{ width:176px; height:38px; float:right; display:inline;}
select.jump-select {
width: 176px;
padding-left:15px;
padding-right:30px;
font-family:"Microsoft Yahei","微软雅黑";
font-size:14px;
color: #c1c1c1;
height:38px;
-moz-appearance:none;
appearance: none;
-webkit-appearance: none;
outline:none;
border:none;
background:url(../images/select-arrow.png) no-repeat center right;
/*Chrome和Firefox里面的边框是不一样的,所以复写了一下*/
order: solid 1px #000;
}
.login-jump-btn{ width:215px; height:37px; margin-top:30px; margin-left:auto; margin-right:auto; }
select::-ms-expand { display: none; }
a.jump-btn{ width:135px; height:37px; display:block; background:url(../images/login-jump-btn1.jpg) no-repeat left center;}
a.help-btn{ width:65px; height:37px; display:block; background:url(../images/help-btn.jpg) no-repeat left center;}
.login-eduroam{ padding-top:65px; height:465px;}
.login-eduroam-form{ width:462px; height:465px; margin-left:auto; margin-right:auto; background-color:#fdfcfc; border-radius:3px; box-shadow:0px 0px 3px rgba(0,0,0,.15); }
.login-eduroam-form > h2{ color:#565656; font-size:18px; padding-top:12px; line-height:2em; text-align:center;}
.login-eduroam-form > h3{ width:100%; background:url(../images/line2.jpg) repeat-x left center; height:20px; text-align:center; }
.login-eduroam-form > h3 > span{color:#85b4ed; font-family:Arial; font-size:12px; -webkit-transform:scale(0.95,0.95) ; *font-size:11px; line-height:1.8em; text-transform:uppercase; background-color:#fcfcfc; display:inline-block; padding-left:10px; padding-right:10px;}
.login-eduroam-tip{background: url(../images/tip-tline.jpg) repeat-x top left; padding-top:15px; padding-bottom:15px; text-align:center;}
ul.eduroam-ul{ margin-left:60px; width:315px;}
ul.eduroam-ul > li > a{ width:300px; padding-left:15px; display:block; text-align:left; background:url(../images/eduroam-li.png) no-repeat left center; color:#959595; font-size:12px; line-height:20px;}
ul.eduroam-ul > li > a > span{ color:#729dd1; font-family:Arial; font-size:12px; -webkit-transform:scale(0.95,0.95) ; *font-size:11px; text-transform:uppercase; display:inline-block; padding-left:5px;}
.login-eduroam-line{ width:346px; height:auto; margin-left:auto; margin-right:auto; margin-top:10px;}
a.login-btn{ width:346px; height:44px; margin-bottom:25px; margin-top:35px; display:block; background:url(../images/login-btn.png) no-repeat top center; }
dl.login-eduroam-txt{ border:solid 1px #c1c1c1; height:38px; width:344px; margin-top:25px;}
dl.login-eduroam-txt dt{ width:37px; height:38px; float:left; display:inline;}
dl.login-eduroam-txt dd{ width:305px; height:28px; padding-top:5px; padding-bottom:5px; float:right; display:inline;}
dl.login-eduroam-txt-user dt{ background:url(../images/user.png) no-repeat center center;}
dl.login-eduroam-txt-password dt{ background:url(../images/password.png) no-repeat center center;}
.login-eduroam-input{ border-left:solid 1px #c1c1c1; width:284px; height:28px; padding:0px 10px; margin:0px; border-bottom:0px; border-right:0px; border-top:0px; outline:none; font-size:14px; line-height:28px; color:#565656;}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<html class="no-js" xmlns:th="http://www.w3.org/1999/xhtml"> <!--<![endif]-->
<head>
<meta charset="utf-8" />
<!--<meta http-equiv="X-UA-Compatible" content="IE=edge">-->
<meta content="" name="description" />
<meta content="width=device-width, initial-scale=1" name="viewport" />
<title></title>
<!--<script src="../js/vendor/modernizr-2.6.2.min.js"></script>-->
</head>
<body>
<span th:text="${message}"></span>
</body></html>
\ No newline at end of file
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<html class="no-js" xmlns:th="http://www.w3.org/1999/xhtml"> <!--<![endif]-->
<head>
<meta charset="utf-8" />
<!--<meta http-equiv="X-UA-Compatible" content="IE=edge">-->
<meta content="" name="description" />
<meta content="width=device-width, initial-scale=1" name="viewport" />
<title>上海教育认证平台</title>
<!-- <link type="text/css" rel="stylesheet" href="./css/css.css" />
<script src="./js/jquery.js" type="text/javascript"></script> -->
<link type="text/css" rel="stylesheet" th:href="@{/static/css/css.css}" />
<script th:src="@{/static/js/jquery.js}" type="text/javascript"></script>
</head>
<body>
<script th:inline="javascript">
/*<![CDATA[*/
var loginType = [[${loginType}]];
var ctxPath = /*[[@{/}]]*/ '';
/*]]>*/
</script>
<script>
//判断是否为金山教育阅读平台访问
if (loginType !== null) {
var args = new Object();
var query = location.search.substring(1);
var param = query.split("&");
for (var i = 0; i < param.length; i++) {
var pos = param[i].indexOf('=');
if (pos == -1) {
continue;
}
var argname = param[i].substring(0, pos);
var value = param[i].substring(pos + 1);
args[argname] = unescape(value);
}
var url = unescape(args['return']) + "&entityID=https://idp.jsedu.sh.cn/idp/shibboleth";
var idp = '金山教育';
//document.location = url;
window.location.href = ctxPath + "auth/tologin?idp="+idp+"&loginUrl=" + encodeURIComponent(url);
}
// 列表选择idp跳转事件
function bfsubmit() {
if ($("#ddl_selectidp").val() != "0") {
var args = new Object();
var query = location.search.substring(1); //获取查询串
var param = query.split("&");
for (var i = 0; i < param.length; i++) {
var pos = param[i].indexOf('='); //查找name=value
if (pos == -1) { //如果没有找到就跳过
continue;
}
var argname = param[i].substring(0, pos); //提取name
var value = param[i].substring(pos + 1); //提取value
args[argname] = unescape(value); //存为属性
}
var url = unescape(args['return']) + "&entityID=" + $("#ddl_selectidp").val();
var idp = $("#ddl_selectidp").find("option:selected").html();
idp = idp.substr(3);
//document.location = url;
window.location.href = ctxPath + "auth/tologin?idp="+idp+"&loginUrl=" + encodeURIComponent(url);
} else {
alert("请选择您所在的学校");
}
}
</script>
<div class="top">
<div class="main">
<a><img th:src="@{/static/images/Rlogo.jpg}" /></a>
</div>
</div>
<div class="login-c">
<div class="main">
<div class="login-list fl">
<ul class="login-list-ul">
</ul>
</div>
<div class="login-form fr">
<h2 class="login-form-h2">用户登录</h2>
<div class="login-jump">
<div class="login-jump-select">
<dl class="jump-select-dl clearfix">
<dt>
<span></span>
</dt>
<dd>
<select name="ddl_selectidp" id="ddl_selectidp" class="jump-select">
<option value="0">选择您所在的学校</option>
<option value="https://idp.shec.edu.cn/idp/shibboleth">01:上海市教委</option>
<option value="https://idpfudan.fudan.edu.cn/idp/shibboleth">02:复旦大学</option>
<option value="https://idp.ecnu.edu.cn/idp/shibboleth">04:华东师范大学</option>
<option value="https://idp.ecust.edu.cn/idp/shibboleth">05:华东理工大学</option>
<option value="https://idp.shisu.edu.cn/idp/shibboleth">06:上海外国语大学</option>
<option value="https://idp.dhu.edu.cn/idp/shibboleth">07:东华大学</option>
<option value="https://idpcarsi.shufe.edu.cn/idp/shibboleth">08:上海财经大学</option>
<option value="https://idp.usst.edu.cn/idp/shibboleth">09:上海理工大学</option>
<option value="https://idp.shiep.edu.cn/idp/shibboleth">10:上海电力学院</option>
<option value="https://idp.shu.edu.cn/idp/shibboleth">11:上海大学</option>
<option value="https://idp.shnu.edu.cn/idp/shibboleth">12:上海师范大学</option>
<option value="https://jaccount.sjtu.edu.cn/idp/shibboleth">15:上海交通大学</option>
<option value="https://idp.shmtu.edu.cn/idp/shibboleth">16:上海海事大学</option>
<option value="https://idp-carsi.shou.edu.cn/idp/shibboleth">17:上海海洋大学</option>
<option value="https://idp.sspu.edu.cn/idp/shibboleth">18:上海第二工业大学</option>
<option value="https://idp.sandau.edu.cn/idp/shibboleth">19:上海杉达学院</option>
<option value="https://idp.sdju.edu.cn/idp/shibboleth">20:上海电机学院</option>
<option value="https://idp.shsmu.edu.cn/idp/shibboleth">21:上海交通大学医学院</option>
<option value="https://idp.shcc.edu.cn/idp/shibboleth">22:上海海关学院</option>
<option value="https://idp.sbs.edu.cn/idp/shibboleth">23:上海商学院</option>
<option value="https://idp.gench.edu.cn/idp/shibboleth">24:上海建桥学院</option>
<option value="https://idp.smmu.edu.cn/idp/shibboleth">25:海军军医大学</option>
<option value="https://idp-carsi.suibe.edu.cn/idp/shibboleth">26:上海对外经贸大学</option>
<option value="https://idp.sus.edu.cn/idp/shibboleth">27:上海体育学院</option>
<option value="https://idp.esu.edu.cn/idp/shibboleth">28:上海东海职业技术学院</option>
<option value="https://idp.shafc.edu.cn/idp/shibboleth">29:上海农林职业技术学院</option>
<option value="https://idp.sicfl.edu.cn/idp/shibboleth">30:上海工商外国语职业学院</option>
<option value="https://idp.shjgu.edu.cn/idp/shibboleth">31:上海济光职业技术学院</option>
<option value="https://idp.sou.edu.cn/idp/shibboleth">32:上海开放大学</option>
<option value="https://idp.sumhs.edu.cn/idp/shibboleth">33:上海健康医学院</option>
<option value="https://idp.ecupl.edu.cn/idp/shibboleth">34:华东政法大学</option>
<option value="https://idp-sma.cloud.sh.edu.cn/idp/shibboleth">35:上海海事职业技术学院</option>
<option value="https://idp.sitsh.edu.cn/idp/shibboleth">36:上海旅游高等专科学校</option>
<option value="https://idp.shpc.edu.cn/idp/shibboleth">37:上海公安学院</option>
<option value="https://idp-shec.cloud.sh.edu.cn/idp/shibboleth">38:认证中心测试子域</option>
<option value="https://idp-xwcb.cloud.sh.edu.cn/idp/shibboleth">39:上海新闻出版职业技术学校</option>
<option value="https://idp-shwmcj.cloud.sh.edu.cn/idp/shibboleth">40:上海市贸易学校</option>
<option value="https://idp-scasqhwz.cloud.sh.edu.cn/idp/shibboleth">41:上海商业会计学校</option>
<option value="https://idp-shnhzx.cloud.sh.edu.cn/idp/shibboleth">42:上海市南湖职校</option>
<option value="https://idp-sems.cloud.sh.edu.cn/idp/shibboleth">43:上海市经济管理学校</option>
<option value="https://idp-sthu.cloud.sh.edu.cn/idp/shibboleth">44:上海师范大学天华学院</option>
<option value="https://idp-sjxqzx.cloud.sh.edu.cn/idp/shibboleth">51:上海市松江区新桥职业技术学校</option>
<option value="https://idp-qpzx.cloud.sh.edu.cn/idp/shibboleth">52:上海市青浦区职业学校</option>
<option value="https://idp.sit.edu.cn/idp/shibboleth">53:上海应用技术大学</option>
<option value="https://idp.scst.edu.cn/idp/shibboleth">54:上海科学技术职业学院</option>
<option value="https://idp.xdsisu.edu.cn/idp/shibboleth">55:上海外国语大学贤达经济人文学院</option>
<option value="https://idp.firstjob.com.cn/idp/shibboleth">56:学生事务中心</option>
<option value="https://idp.hpe.cn/idp/shibboleth">57:黄浦区教育信息中心</option>
<option value="https://idp.chneic.sh.cn/idp/shibboleth">58:长宁区教育信息中心</option>
<option value="https://idp.sjedu.cn/idp/shibboleth">59:松江智慧教育</option>
<option value="https://idp.mhedu.sh.cn/idp/shibboleth">60:闵行区教育局信息中心</option>
<option value="https://idp.xhedu.sh.cn/idp/shibboleth">61:徐汇教育</option>
<option value="https://idp.qpedu.cn/idp/shibboleth">62:青浦教育</option>
<option value="https://idp.jsedu.sh.cn/idp/shibboleth">63:金山教育</option>
<option value="https://idp-cmjy.cloud.sh.edu.cn/idp/shibboleth">64:崇明教育</option>
<option value="https://idp.pte.sh.cn/idp/shibboleth">66:普陀教育</option>
<option value="https://idp-age03.cloud.sh.edu.cn/idp/shibboleth">70:学前03子域</option>
<option value="https://idp-huiyuan.cloud.sh.edu.cn/idp/shibboleth">72:慧源共享认证子域</option>
<option value="https://idp-age06.cloud.sh.edu.cn/idp/shibboleth">73:学前教育认证</option>
<option value="https://idp-zzyrz.cloud.sh.edu.cn/idp/shibboleth">75:中职开放课程云认证</option>
<option value="https://stu-idp.edu.sh.cn/idp/shibboleth">76:电教馆-idp</option>
</select>
</dd>
</dl>
</div>
<div class="login-jump-btn">
<table cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="left"><a href="#" class="jump-btn" onclick="bfsubmit();"></a></td>
<td align="right"><a href="#" class="help-btn"></a></td>
</tr>
</table>
</div>
</div>
<div class="login-form-tip">
<p>建议使用IE10.0及以上版本浏览器或同类浏览器,</p>
<p>建议使用1024×768及以上分辨率浏览,</p>
</div>
</div>
<div class="clear"></div>
</div>
</div>
<div class="bottom">
<p>版权所有&copy;上海教育认证中心</p>
</div>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<html class="no-js" xmlns:th="http://www.w3.org/1999/xhtml"> <!--<![endif]-->
<head>
<meta charset="utf-8" />
<!--<meta http-equiv="X-UA-Compatible" content="IE=edge">-->
<meta content="" name="description" />
<meta content="width=device-width, initial-scale=1" name="viewport" />
<title>上海数字教材运营管理中心</title>
<link rel="stylesheet" th:href="@{/static/css/main_0216.css}"/>
<link rel="stylesheet" th:href="@{/static/css/bootstrap.min.css}"/>
<link rel="stylesheet" th:href="@{/static/css/normalize.css}"/>
<script type="text/javascript" th:src="@{/static/js/jquery-1.10.2.min.js}"></script>
<!--<script src="../js/vendor/modernizr-2.6.2.min.js"></script>-->
</head>
<body>
<!--[if lt IE 7]>
<p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a
href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
<![endif]-->
<div class="bg">
<div class="bg-form">
<div class="loginContainer">
<!--<h1>上海数字教材运营管理中心</h1>-->
<div class="login-box">
<!-- <div class="bg-form" style="width: 80%;margin: 0 auto"></div> -->
<button onclick="toLogin(1)" accesskey="l" class="login-btn" id="login-button" name="button" style="outline:0;" type="button">登录
</button>
<div class="login-span"><span>如果您曾经参与上海市中小学数字教材试验项目,</span><span><a style="color:red;"onclick="toLogin(2)">请点击此处使用数字教材账号登录>></a></span></div> <!-- </div> -->
</div>
</div>
</div>
</div>
<script th:inline="javascript">
/*<![CDATA[*/
var loginUrl1 = [[${loginUrl1}]];
var loginUrl2 = [[${loginUrl2}]];
var logId = [[${logId}]];
var ctxPath = /*[[@{/}]]*/ '';
/*]]>*/
</script>
<script type="text/javascript">
function toLogin (num) {
var baseUrl = ctxPath + "auth/tologin?logId="+logId+"&oauthType=";
//var baseUrl = ctxPath + "auth/tologin?oauthType=";
if (num === 1) {
window.location.href = baseUrl+ "dianjiaoguan&loginUrl=" + encodeURIComponent(loginUrl1);
} else if (num === 2) {
window.location.href = baseUrl+ "edenoperation&loginUrl=" + encodeURIComponent(loginUrl2);
}
return false;
}
</script>
</body></html>
\ No newline at end of file
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<html class="no-js" xmlns:th="http://www.w3.org/1999/xhtml"> <!--<![endif]-->
<head>
<meta charset="utf-8" />
<!--<meta http-equiv="X-UA-Compatible" content="IE=edge">-->
<meta content="" name="description" />
<meta content="width=device-width, initial-scale=1" name="viewport" />
<title>上海数字教材运营管理中心</title>
<script type="text/javascript" th:src="@{/static/js/jquery.js}"></script>
<!--<script src="../js/vendor/modernizr-2.6.2.min.js"></script>-->
</head>
<body>
<form th:action="${successPostUrl}" method="post" th:object="${clientDataInfo}">
<input type="hidden" th:value="${clientDataInfo.authUserInfo.id}" name="authUserInfo.id"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.loginName}" name="authUserInfo.loginName"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.realName}" name="authUserInfo.realName"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.userType}" name="authUserInfo.userType"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.source}" name="authUserInfo.source"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.studentId}" name="authUserInfo.studentId"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.studentCode}" name="authUserInfo.studentCode"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.studentStage}" name="authUserInfo.studentStage"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.studentGrade}" name="authUserInfo.studentGrade"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.studentClass}" name="authUserInfo.studentClass"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.studentStageName}" name="authUserInfo.studentStageName"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.studentGradeName}" name="authUserInfo.studentGradeName"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.studentClassName}" name="authUserInfo.studentClassName"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.studentSchoolId}" name="authUserInfo.studentSchoolId"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.studentCodeStatus}" name="authUserInfo.studentCodeStatus"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.studentSchoolCode}" name="authUserInfo.studentSchoolCode"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.studentSchoolName}" name="authUserInfo.studentSchoolName"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.studentRegionCode}" name="authUserInfo.studentRegionCode"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.studentRegionName}" name="authUserInfo.studentRegionName"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.teacherTrainingNo}" name="authUserInfo.teacherTrainingNo"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.teacherTrainingUserName}" name="authUserInfo.teacherTrainingUserName"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.teacherRegionCode}" name="authUserInfo.teacherRegionCode"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.teacherCampusCode}" name="authUserInfo.teacherCampusCode"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.teacherTrainingSchoolType}" name="authUserInfo.teacherTrainingSchoolType"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.teacherStage}" name="authUserInfo.teacherStage"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.teacherGrade}" name="authUserInfo.teacherGrade"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.teacherSubject}" name="authUserInfo.teacherSubject"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.teacherSchoolId}" name="authUserInfo.teacherSchoolId"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.teacherSchoolName}" name="authUserInfo.teacherSchoolName"/>
<input type="hidden" th:value="${clientDataInfo.returnUrl}" name="returnUrl"/>
<input type="hidden" th:value="${clientDataInfo.oauthType}" name="oauthType"/>
</form>
<script type="text/javascript">
$(function(){
$("form").submit();
})
</script>
</body></html>
\ No newline at end of file
server:
port: 9600
context-path: /authcenter
spring:
application:
name: eden-authcenter-agent
mvc:
static-path-pattern: /static/**
thymeleaf:
cache: false
prefix: classpath:/templates/
suffix: .html
mode: LEGACYHTML5
encoding: UTF-8
enabled: true
content-type: text/html
jackson:
property-naming-strategy: CAMEL_CASE_TO_LOWER_CASE_WITH_UNDERSCORES
default-property-inclusion: non_null
serialization: true
date-format: yyyy-MM-dd HH:mm:ss
time-zone: GMT+8
http:
multipart:
max-file-size: 200MB
max-request-size: 300MB
oauth:
items:
dianjiaoguan: #电教馆
#oauthUrl: https://castest.edu.sh.cn/CAS
oauthUrl: https://cas2.edu.sh.cn/CAS
clientId: clientid
clientSecret: clientSecret
loginSuccessUrl: https://ds.etextbook.cn/authcenter/auth/loginsuccess
logoutSuccessUrl: https://ds.etextbook.cn/authcenter/auth/logoutsuccess
edenoperation: #运营中心
#oauthUrl: https://operator-api-test.etextbook.cn/cas
oauthUrl: https://operator-api.sh-genius.cn/cas/
clientId: testClentId
clientSecret: testClientSecret
loginSuccessUrl: https://ds.etextbook.cn/authcenter/auth/loginsuccess
logoutSuccessUrl: https://ds.etextbook.cn/authcenter/auth/logoutsuccess
oauthclient:
clients:
- clientName: 金山阅读
clientId: jsydClentId
clientSecret: jsydClientSecret
- clientName: 接入样例
clientId: testClentId2
clientSecret: testClientSecret2
{
"mongo": [
{
"connectionName": "mongo",
"host": "dds-uf6124f9044c34741.mongodb.rds.aliyuncs.com",
"port": 3717,
"replicaSet": "dds-uf6124f9044c34741.mongodb.rds.aliyuncs.com:3717",
"maxConnectionsPerHost": 3000,
"threadsAllowedToBlockForConnectionMultiplier": 10,
"authentication": true,
"connectTimeout": 10000,
"password": "ChineseAll&0219",
"userName": "spuser",
"dbName": "splog"
}
],
"mongotest": [
{
"connectionName": "mongo",
"host": "localhost",
"port": 27017,
"replicaSet": "localhost:27017",
"maxConnectionsPerHost": 3000,
"threadsAllowedToBlockForConnectionMultiplier": 10,
"authentication": false,
"connectTimeout": 10000,
"password": "123456",
"userName": "root",
"dbName": "dslog"
}
]
}
\ No newline at end of file
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big,
cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl,
dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, thead, tr, th, td, header {
margin: 0;
padding: 0;
border: 0;
}
ul li{ list-style:none;}
a{ text-decoration:none; outline:none;}
h1, h2, h3, h4 {
font-weight:normal;
}
html{
font-size:14px;
font-family:"Microsoft Yahei","微软雅黑"; color:#323232;
}
ul li{ list-style:none; margin: 0; padding: 0; border: 0;}
a{ text-decoration:none; -webkit-tap-highlight-color: transparent; }
.fl{ float:left; display:inline;}
.fr{ float:right; display:inline;}
.none{ display:none;}
.clearfix{overflow:hidden;_zoom:1;}
.clear{ clear:both;}
::-webkit-input-placeholder { /* WebKit browsers */
font-size:14px;
color:#c1c1c1;
font-family:"Microsoft Yahei","微软雅黑";
}
:-moz-placeholder { /* Mozilla Firefox 4 to 18 */
font-size:14px;
color:#c1c1c1;
font-family:"Microsoft Yahei","微软雅黑";
}
::-moz-placeholder { /* Mozilla Firefox 19+ */
font-size:14px;
color:#c1c1c1;
font-family:"Microsoft Yahei","微软雅黑";
}
:-ms-input-placeholder { /* Internet Explorer 10+ */
font-size:14px;
color:#c1c1c1;
font-family:"Microsoft Yahei","微软雅黑";
}
.top{ width:100%; height:115px; border-top:solid 5px #87abe0;}
.main{ width:1070px; height:auto; margin-left:auto; margin-right:auto;}
.bottom{ width:100%; height:239px; background:#fff url(../images/Login-b.jpg) no-repeat top center; }
.pbottom{ position:absolute; bottom:0px;}
.bottom > p{ color:#aab9c5; font-size:12px; line-height:75px; text-align:center; }
.login-c{ width:100%; height:603px; background:url(../images/login-bg.jpg) no-repeat center center;}
.login-list{ padding-top:95px; padding-left:62px; }
ul.login-list-ul{ width:442px; height:285px; padding-left:30px; padding-top:25px; background:url(../images/login-list-bg.png) no-repeat top left;}
ul.login-list-ul > li > a{ padding-left:26px; width:416px; display:block; height:35px; line-height:35px; background:url(../images/li-icon.png) no-repeat left center; color:#313131; font-size:14px; }
ul.login-list-ul > li > a:hover{ text-decoration:underline;}
.login-form{ background-color:#fbfbfb; border-radius:3px; box-shadow:0px 0px 3px rgba(0,0,0,.15); width:270px; margin-top:90px;}
.login-form-h2{ border-bottom:solid 1px #f2f2f2; text-align:center; color:#565656; font-size:16px; line-height:55px; }
.login-form-tip{ background:url(../images/tip-tline.jpg) repeat-x top left; padding-top:16px; padding-bottom:20px; width:260px; margin-left:auto; margin-right:auto; }
.login-form-tip > p{ color:#9b9b9b; font-size:12px; -webkit-transform:scale(0.95,0.95) ; *font-size:11px; line-height:1.8em;}
.login-form-tip > p > a{ color:#5c5c5b; text-decoration:underline;}
.login-jump{height:110px; padding-top:50px; padding-bottom:50px;}
dl.jump-select-dl{ width:213px; height:38px; border:solid 1px #c1c1c1; margin-left:auto; margin-right:auto;}
dl.jump-select-dl dt{ width:37px; height:28px; padding-top:5px; padding-bottom:5px; float:left; display:inline; background:url(../images/user.png) no-repeat center center;}
dl.jump-select-dl > dt >span{ display:block; width:36px; height:28px; border-right:solid 1px #c1c1c1;}
dl.jump-select-dl dd{ width:176px; height:38px; float:right; display:inline;}
select.jump-select {
width: 176px;
padding-left:15px;
padding-right:30px;
font-family:"Microsoft Yahei","微软雅黑";
font-size:14px;
color: #c1c1c1;
height:38px;
-moz-appearance:none;
appearance: none;
-webkit-appearance: none;
outline:none;
border:none;
background:url(../images/select-arrow.png) no-repeat center right;
/*Chrome和Firefox里面的边框是不一样的,所以复写了一下*/
order: solid 1px #000;
}
.login-jump-btn{ width:215px; height:37px; margin-top:30px; margin-left:auto; margin-right:auto; }
select::-ms-expand { display: none; }
a.jump-btn{ width:135px; height:37px; display:block; background:url(../images/login-jump-btn1.jpg) no-repeat left center;}
a.help-btn{ width:65px; height:37px; display:block; background:url(../images/help-btn.jpg) no-repeat left center;}
.login-eduroam{ padding-top:65px; height:465px;}
.login-eduroam-form{ width:462px; height:465px; margin-left:auto; margin-right:auto; background-color:#fdfcfc; border-radius:3px; box-shadow:0px 0px 3px rgba(0,0,0,.15); }
.login-eduroam-form > h2{ color:#565656; font-size:18px; padding-top:12px; line-height:2em; text-align:center;}
.login-eduroam-form > h3{ width:100%; background:url(../images/line2.jpg) repeat-x left center; height:20px; text-align:center; }
.login-eduroam-form > h3 > span{color:#85b4ed; font-family:Arial; font-size:12px; -webkit-transform:scale(0.95,0.95) ; *font-size:11px; line-height:1.8em; text-transform:uppercase; background-color:#fcfcfc; display:inline-block; padding-left:10px; padding-right:10px;}
.login-eduroam-tip{background: url(../images/tip-tline.jpg) repeat-x top left; padding-top:15px; padding-bottom:15px; text-align:center;}
ul.eduroam-ul{ margin-left:60px; width:315px;}
ul.eduroam-ul > li > a{ width:300px; padding-left:15px; display:block; text-align:left; background:url(../images/eduroam-li.png) no-repeat left center; color:#959595; font-size:12px; line-height:20px;}
ul.eduroam-ul > li > a > span{ color:#729dd1; font-family:Arial; font-size:12px; -webkit-transform:scale(0.95,0.95) ; *font-size:11px; text-transform:uppercase; display:inline-block; padding-left:5px;}
.login-eduroam-line{ width:346px; height:auto; margin-left:auto; margin-right:auto; margin-top:10px;}
a.login-btn{ width:346px; height:44px; margin-bottom:25px; margin-top:35px; display:block; background:url(../images/login-btn.png) no-repeat top center; }
dl.login-eduroam-txt{ border:solid 1px #c1c1c1; height:38px; width:344px; margin-top:25px;}
dl.login-eduroam-txt dt{ width:37px; height:38px; float:left; display:inline;}
dl.login-eduroam-txt dd{ width:305px; height:28px; padding-top:5px; padding-bottom:5px; float:right; display:inline;}
dl.login-eduroam-txt-user dt{ background:url(../images/user.png) no-repeat center center;}
dl.login-eduroam-txt-password dt{ background:url(../images/password.png) no-repeat center center;}
.login-eduroam-input{ border-left:solid 1px #c1c1c1; width:284px; height:28px; padding:0px 10px; margin:0px; border-bottom:0px; border-right:0px; border-top:0px; outline:none; font-size:14px; line-height:28px; color:#565656;}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<html class="no-js" xmlns:th="http://www.w3.org/1999/xhtml"> <!--<![endif]-->
<head>
<meta charset="utf-8" />
<!--<meta http-equiv="X-UA-Compatible" content="IE=edge">-->
<meta content="" name="description" />
<meta content="width=device-width, initial-scale=1" name="viewport" />
<title></title>
<!--<script src="../js/vendor/modernizr-2.6.2.min.js"></script>-->
</head>
<body>
<span th:text="${message}"></span>
</body></html>
\ No newline at end of file
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<html class="no-js" xmlns:th="http://www.w3.org/1999/xhtml"> <!--<![endif]-->
<head>
<meta charset="utf-8" />
<!--<meta http-equiv="X-UA-Compatible" content="IE=edge">-->
<meta content="" name="description" />
<meta content="width=device-width, initial-scale=1" name="viewport" />
<title>上海教育认证平台</title>
<!-- <link type="text/css" rel="stylesheet" href="./css/css.css" />
<script src="./js/jquery.js" type="text/javascript"></script> -->
<link type="text/css" rel="stylesheet" th:href="@{/static/css/css.css}" />
<script th:src="@{/static/js/jquery.js}" type="text/javascript"></script>
</head>
<body>
<script th:inline="javascript">
/*<![CDATA[*/
var loginType = [[${loginType}]];
var ctxPath = /*[[@{/}]]*/ '';
/*]]>*/
</script>
<script>
//判断是否为金山教育阅读平台访问
if (loginType !== null) {
var args = new Object();
var query = location.search.substring(1);
var param = query.split("&");
for (var i = 0; i < param.length; i++) {
var pos = param[i].indexOf('=');
if (pos == -1) {
continue;
}
var argname = param[i].substring(0, pos);
var value = param[i].substring(pos + 1);
args[argname] = unescape(value);
}
var url = unescape(args['return']) + "&entityID=https://idp.jsedu.sh.cn/idp/shibboleth";
var idp = $("#ddl_selectidp").find("option:selected").html();
idp = idp.substr(3);
//document.location = url;
window.location.href = ctxPath + "auth/tologin?idp="+idp+"&loginUrl="; + encodeURIComponent(url);
}
// 列表选择idp跳转事件
function bfsubmit() {
if ($("#ddl_selectidp").val() != "0") {
var args = new Object();
var query = location.search.substring(1); //获取查询串
var param = query.split("&");
for (var i = 0; i < param.length; i++) {
var pos = param[i].indexOf('='); //查找name=value
if (pos == -1) { //如果没有找到就跳过
continue;
}
var argname = param[i].substring(0, pos); //提取name
var value = param[i].substring(pos + 1); //提取value
args[argname] = unescape(value); //存为属性
}
var url = unescape(args['return']) + "&entityID=" + $("#ddl_selectidp").val();
var idp = $("#ddl_selectidp").find("option:selected").html();
idp = idp.substr(3);
//document.location = url;
window.location.href = ctxPath + "auth/tologin?idp="+idp+"&loginUrl="; + encodeURIComponent(url);
} else {
alert("请选择您所在的学校");
}
}
</script>
<div class="top">
<div class="main">
<a><img th:src="@{/static/images/Rlogo.jpg}" /></a>
</div>
</div>
<div class="login-c">
<div class="main">
<div class="login-list fl">
<ul class="login-list-ul">
</ul>
</div>
<div class="login-form fr">
<h2 class="login-form-h2">用户登录</h2>
<div class="login-jump">
<div class="login-jump-select">
<dl class="jump-select-dl clearfix">
<dt>
<span></span>
</dt>
<dd>
<select name="ddl_selectidp" id="ddl_selectidp" class="jump-select">
<option value="0">选择您所在的学校</option>
<option value="https://idp.shec.edu.cn/idp/shibboleth">01:上海市教委</option>
<option value="https://idpfudan.fudan.edu.cn/idp/shibboleth">02:复旦大学</option>
<option value="https://idp.ecnu.edu.cn/idp/shibboleth">04:华东师范大学</option>
<option value="https://idp.ecust.edu.cn/idp/shibboleth">05:华东理工大学</option>
<option value="https://idp.shisu.edu.cn/idp/shibboleth">06:上海外国语大学</option>
<option value="https://idp.dhu.edu.cn/idp/shibboleth">07:东华大学</option>
<option value="https://idpcarsi.shufe.edu.cn/idp/shibboleth">08:上海财经大学</option>
<option value="https://idp.usst.edu.cn/idp/shibboleth">09:上海理工大学</option>
<option value="https://idp.shiep.edu.cn/idp/shibboleth">10:上海电力学院</option>
<option value="https://idp.shu.edu.cn/idp/shibboleth">11:上海大学</option>
<option value="https://idp.shnu.edu.cn/idp/shibboleth">12:上海师范大学</option>
<option value="https://jaccount.sjtu.edu.cn/idp/shibboleth">15:上海交通大学</option>
<option value="https://idp.shmtu.edu.cn/idp/shibboleth">16:上海海事大学</option>
<option value="https://idp-carsi.shou.edu.cn/idp/shibboleth">17:上海海洋大学</option>
<option value="https://idp.sspu.edu.cn/idp/shibboleth">18:上海第二工业大学</option>
<option value="https://idp.sandau.edu.cn/idp/shibboleth">19:上海杉达学院</option>
<option value="https://idp.sdju.edu.cn/idp/shibboleth">20:上海电机学院</option>
<option value="https://idp.shsmu.edu.cn/idp/shibboleth">21:上海交通大学医学院</option>
<option value="https://idp.shcc.edu.cn/idp/shibboleth">22:上海海关学院</option>
<option value="https://idp.sbs.edu.cn/idp/shibboleth">23:上海商学院</option>
<option value="https://idp.gench.edu.cn/idp/shibboleth">24:上海建桥学院</option>
<option value="https://idp.smmu.edu.cn/idp/shibboleth">25:海军军医大学</option>
<option value="https://idp-carsi.suibe.edu.cn/idp/shibboleth">26:上海对外经贸大学</option>
<option value="https://idp.sus.edu.cn/idp/shibboleth">27:上海体育学院</option>
<option value="https://idp.esu.edu.cn/idp/shibboleth">28:上海东海职业技术学院</option>
<option value="https://idp.shafc.edu.cn/idp/shibboleth">29:上海农林职业技术学院</option>
<option value="https://idp.sicfl.edu.cn/idp/shibboleth">30:上海工商外国语职业学院</option>
<option value="https://idp.shjgu.edu.cn/idp/shibboleth">31:上海济光职业技术学院</option>
<option value="https://idp.sou.edu.cn/idp/shibboleth">32:上海开放大学</option>
<option value="https://idp.sumhs.edu.cn/idp/shibboleth">33:上海健康医学院</option>
<option value="https://idp.ecupl.edu.cn/idp/shibboleth">34:华东政法大学</option>
<option value="https://idp-sma.cloud.sh.edu.cn/idp/shibboleth">35:上海海事职业技术学院</option>
<option value="https://idp.sitsh.edu.cn/idp/shibboleth">36:上海旅游高等专科学校</option>
<option value="https://idp.shpc.edu.cn/idp/shibboleth">37:上海公安学院</option>
<option value="https://idp-shec.cloud.sh.edu.cn/idp/shibboleth">38:认证中心测试子域</option>
<option value="https://idp-xwcb.cloud.sh.edu.cn/idp/shibboleth">39:上海新闻出版职业技术学校</option>
<option value="https://idp-shwmcj.cloud.sh.edu.cn/idp/shibboleth">40:上海市贸易学校</option>
<option value="https://idp-scasqhwz.cloud.sh.edu.cn/idp/shibboleth">41:上海商业会计学校</option>
<option value="https://idp-shnhzx.cloud.sh.edu.cn/idp/shibboleth">42:上海市南湖职校</option>
<option value="https://idp-sems.cloud.sh.edu.cn/idp/shibboleth">43:上海市经济管理学校</option>
<option value="https://idp-sthu.cloud.sh.edu.cn/idp/shibboleth">44:上海师范大学天华学院</option>
<option value="https://idp-sjxqzx.cloud.sh.edu.cn/idp/shibboleth">51:上海市松江区新桥职业技术学校</option>
<option value="https://idp-qpzx.cloud.sh.edu.cn/idp/shibboleth">52:上海市青浦区职业学校</option>
<option value="https://idp.sit.edu.cn/idp/shibboleth">53:上海应用技术大学</option>
<option value="https://idp.scst.edu.cn/idp/shibboleth">54:上海科学技术职业学院</option>
<option value="https://idp.xdsisu.edu.cn/idp/shibboleth">55:上海外国语大学贤达经济人文学院</option>
<option value="https://idp.firstjob.com.cn/idp/shibboleth">56:学生事务中心</option>
<option value="https://idp.hpe.cn/idp/shibboleth">57:黄浦区教育信息中心</option>
<option value="https://idp.chneic.sh.cn/idp/shibboleth">58:长宁区教育信息中心</option>
<option value="https://idp.sjedu.cn/idp/shibboleth">59:松江智慧教育</option>
<option value="https://idp.mhedu.sh.cn/idp/shibboleth">60:闵行区教育局信息中心</option>
<option value="https://idp.xhedu.sh.cn/idp/shibboleth">61:徐汇教育</option>
<option value="https://idp.qpedu.cn/idp/shibboleth">62:青浦教育</option>
<option value="https://idp.jsedu.sh.cn/idp/shibboleth">63:金山教育</option>
<option value="https://idp-cmjy.cloud.sh.edu.cn/idp/shibboleth">64:崇明教育</option>
<option value="https://idp.pte.sh.cn/idp/shibboleth">66:普陀教育</option>
<option value="https://idp-age03.cloud.sh.edu.cn/idp/shibboleth">70:学前03子域</option>
<option value="https://idp-huiyuan.cloud.sh.edu.cn/idp/shibboleth">72:慧源共享认证子域</option>
<option value="https://idp-age06.cloud.sh.edu.cn/idp/shibboleth">73:学前教育认证</option>
<option value="https://idp-zzyrz.cloud.sh.edu.cn/idp/shibboleth">75:中职开放课程云认证</option>
<option value="https://stu-idp.edu.sh.cn/idp/shibboleth">76:电教馆-idp</option>
</select>
</dd>
</dl>
</div>
<div class="login-jump-btn">
<table cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="left"><a href="#" class="jump-btn" onclick="bfsubmit();"></a></td>
<td align="right"><a href="#" class="help-btn"></a></td>
</tr>
</table>
</div>
</div>
<div class="login-form-tip">
<p>建议使用IE10.0及以上版本浏览器或同类浏览器,</p>
<p>建议使用1024×768及以上分辨率浏览,</p>
</div>
</div>
<div class="clear"></div>
</div>
</div>
<div class="bottom">
<p>版权所有&copy;上海教育认证中心</p>
</div>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<html class="no-js" xmlns:th="http://www.w3.org/1999/xhtml"> <!--<![endif]-->
<head>
<meta charset="utf-8" />
<!--<meta http-equiv="X-UA-Compatible" content="IE=edge">-->
<meta content="" name="description" />
<meta content="width=device-width, initial-scale=1" name="viewport" />
<title>上海数字教材运营管理中心</title>
<link rel="stylesheet" th:href="@{/static/css/main_0216.css}"/>
<link rel="stylesheet" th:href="@{/static/css/bootstrap.min.css}"/>
<link rel="stylesheet" th:href="@{/static/css/normalize.css}"/>
<script type="text/javascript" th:src="@{/static/js/jquery-1.10.2.min.js}"></script>
<!--<script src="../js/vendor/modernizr-2.6.2.min.js"></script>-->
</head>
<body>
<!--[if lt IE 7]>
<p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a
href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
<![endif]-->
<div class="bg">
<div class="bg-form">
<div class="loginContainer">
<!--<h1>上海数字教材运营管理中心</h1>-->
<div class="login-box">
<!-- <div class="bg-form" style="width: 80%;margin: 0 auto"></div> -->
<button onclick="toLogin(1)" accesskey="l" class="login-btn" id="login-button" name="button" style="outline:0;" type="button">登录
</button>
<div class="login-span"><span>如果您曾经参与上海市中小学数字教材试验项目,</span><span><a style="color:red;"onclick="toLogin(2)">请点击此处使用数字教材账号登录>></a></span></div> <!-- </div> -->
</div>
</div>
</div>
</div>
<script th:inline="javascript">
/*<![CDATA[*/
var loginUrl1 = [[${loginUrl1}]];
var loginUrl2 = [[${loginUrl2}]];
var logId = [[${logId}]];
var ctxPath = /*[[@{/}]]*/ '';
/*]]>*/
</script>
<script type="text/javascript">
function toLogin (num) {
var baseUrl = ctxPath + "auth/tologin?logId="+logId+"&oauthType=";
//var baseUrl = ctxPath + "auth/tologin?oauthType=";
if (num === 1) {
window.location.href = baseUrl+ "dianjiaoguan&loginUrl=" + encodeURIComponent(loginUrl1);
} else if (num === 2) {
window.location.href = baseUrl+ "edenoperation&loginUrl=" + encodeURIComponent(loginUrl2);
}
return false;
}
</script>
</body></html>
\ No newline at end of file
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<html class="no-js" xmlns:th="http://www.w3.org/1999/xhtml"> <!--<![endif]-->
<head>
<meta charset="utf-8" />
<!--<meta http-equiv="X-UA-Compatible" content="IE=edge">-->
<meta content="" name="description" />
<meta content="width=device-width, initial-scale=1" name="viewport" />
<title>上海数字教材运营管理中心</title>
<script type="text/javascript" th:src="@{/static/js/jquery.js}"></script>
<!--<script src="../js/vendor/modernizr-2.6.2.min.js"></script>-->
</head>
<body>
<form th:action="${successPostUrl}" method="post" th:object="${clientDataInfo}">
<input type="hidden" th:value="${clientDataInfo.authUserInfo.id}" name="authUserInfo.id"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.loginName}" name="authUserInfo.loginName"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.realName}" name="authUserInfo.realName"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.userType}" name="authUserInfo.userType"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.source}" name="authUserInfo.source"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.studentId}" name="authUserInfo.studentId"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.studentCode}" name="authUserInfo.studentCode"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.studentStage}" name="authUserInfo.studentStage"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.studentGrade}" name="authUserInfo.studentGrade"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.studentClass}" name="authUserInfo.studentClass"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.studentStageName}" name="authUserInfo.studentStageName"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.studentGradeName}" name="authUserInfo.studentGradeName"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.studentClassName}" name="authUserInfo.studentClassName"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.studentSchoolId}" name="authUserInfo.studentSchoolId"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.studentCodeStatus}" name="authUserInfo.studentCodeStatus"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.studentSchoolCode}" name="authUserInfo.studentSchoolCode"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.studentSchoolName}" name="authUserInfo.studentSchoolName"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.studentRegionCode}" name="authUserInfo.studentRegionCode"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.studentRegionName}" name="authUserInfo.studentRegionName"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.teacherTrainingNo}" name="authUserInfo.teacherTrainingNo"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.teacherTrainingUserName}" name="authUserInfo.teacherTrainingUserName"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.teacherRegionCode}" name="authUserInfo.teacherRegionCode"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.teacherCampusCode}" name="authUserInfo.teacherCampusCode"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.teacherTrainingSchoolType}" name="authUserInfo.teacherTrainingSchoolType"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.teacherStage}" name="authUserInfo.teacherStage"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.teacherGrade}" name="authUserInfo.teacherGrade"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.teacherSubject}" name="authUserInfo.teacherSubject"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.teacherSchoolId}" name="authUserInfo.teacherSchoolId"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.teacherSchoolName}" name="authUserInfo.teacherSchoolName"/>
<input type="hidden" th:value="${clientDataInfo.returnUrl}" name="returnUrl"/>
<input type="hidden" th:value="${clientDataInfo.oauthType}" name="oauthType"/>
</form>
<script type="text/javascript">
$(function(){
$("form").submit();
})
</script>
</body></html>
\ No newline at end of file
#Generated by Apache Maven
#Mon Jul 27 18:29:45 CST 2020
version=1.0-SNAPSHOT
groupId=com.chineseall.authcenter
artifactId=sh-authcenter-agent
com\chineseall\authcenter\agent\utils\CookiesUtil.class
com\chineseall\authcenter\agent\client\ClientUserType.class
com\chineseall\authcenter\agent\utils\EncodeUtil.class
com\chineseall\authcenter\agent\client\OauthClient.class
com\chineseall\authcenter\agent\controller\SampleController.class
com\chineseall\authcenter\agent\EdenAuthcenterAgentApplication.class
com\chineseall\authcenter\agent\client\ClientDataInfo.class
com\chineseall\authcenter\agent\oauth\OauthType.class
com\chineseall\authcenter\agent\controller\AuthController.class
com\chineseall\authcenter\agent\oauth\OauthConfigItem.class
com\chineseall\authcenter\agent\client\ClientItem.class
com\chineseall\authcenter\agent\utils\ConvertMessageMapToBean.class
com\chineseall\authcenter\agent\client\AuthUserInfo.class
com\chineseall\authcenter\agent\oauth\OauthConfig.class
server:
port: 9600
context-path: /authcenter
spring:
application:
name: eden-authcenter-agent
mvc:
static-path-pattern: /static/**
thymeleaf:
cache: false
prefix: classpath:/templates/
suffix: .html
mode: LEGACYHTML5
encoding: UTF-8
enabled: true
content-type: text/html
jackson:
property-naming-strategy: CAMEL_CASE_TO_LOWER_CASE_WITH_UNDERSCORES
default-property-inclusion: non_null
serialization: true
date-format: yyyy-MM-dd HH:mm:ss
time-zone: GMT+8
http:
multipart:
max-file-size: 200MB
max-request-size: 300MB
oauth:
items:
dianjiaoguan: #电教馆
#oauthUrl: https://castest.edu.sh.cn/CAS
oauthUrl: https://cas2.edu.sh.cn/CAS
clientId: clientid
clientSecret: clientSecret
loginSuccessUrl: https://ds.etextbook.cn/authcenter/auth/loginsuccess
logoutSuccessUrl: https://ds.etextbook.cn/authcenter/auth/logoutsuccess
edenoperation: #运营中心
#oauthUrl: https://operator-api-test.etextbook.cn/cas
oauthUrl: https://operator-api.sh-genius.cn/cas/
clientId: testClentId
clientSecret: testClientSecret
loginSuccessUrl: https://ds.etextbook.cn/authcenter/auth/loginsuccess
logoutSuccessUrl: https://ds.etextbook.cn/authcenter/auth/logoutsuccess
oauthclient:
clients:
- clientName: 金山阅读
clientId: jsydClentId
clientSecret: jsydClientSecret
- clientName: 接入样例
clientId: testClentId2
clientSecret: testClientSecret2
{
"mongo": [
{
"connectionName": "mongo",
"host": "dds-uf6124f9044c34741.mongodb.rds.aliyuncs.com",
"port": 3717,
"replicaSet": "dds-uf6124f9044c34741.mongodb.rds.aliyuncs.com:3717",
"maxConnectionsPerHost": 3000,
"threadsAllowedToBlockForConnectionMultiplier": 10,
"authentication": true,
"connectTimeout": 10000,
"password": "ChineseAll&0219",
"userName": "spuser",
"dbName": "splog"
}
],
"mongotest": [
{
"connectionName": "mongo",
"host": "localhost",
"port": 27017,
"replicaSet": "localhost:27017",
"maxConnectionsPerHost": 3000,
"threadsAllowedToBlockForConnectionMultiplier": 10,
"authentication": false,
"connectTimeout": 10000,
"password": "123456",
"userName": "root",
"dbName": "dslog"
}
]
}
\ No newline at end of file
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big,
cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl,
dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, thead, tr, th, td, header {
margin: 0;
padding: 0;
border: 0;
}
ul li{ list-style:none;}
a{ text-decoration:none; outline:none;}
h1, h2, h3, h4 {
font-weight:normal;
}
html{
font-size:14px;
font-family:"Microsoft Yahei","微软雅黑"; color:#323232;
}
ul li{ list-style:none; margin: 0; padding: 0; border: 0;}
a{ text-decoration:none; -webkit-tap-highlight-color: transparent; }
.fl{ float:left; display:inline;}
.fr{ float:right; display:inline;}
.none{ display:none;}
.clearfix{overflow:hidden;_zoom:1;}
.clear{ clear:both;}
::-webkit-input-placeholder { /* WebKit browsers */
font-size:14px;
color:#c1c1c1;
font-family:"Microsoft Yahei","微软雅黑";
}
:-moz-placeholder { /* Mozilla Firefox 4 to 18 */
font-size:14px;
color:#c1c1c1;
font-family:"Microsoft Yahei","微软雅黑";
}
::-moz-placeholder { /* Mozilla Firefox 19+ */
font-size:14px;
color:#c1c1c1;
font-family:"Microsoft Yahei","微软雅黑";
}
:-ms-input-placeholder { /* Internet Explorer 10+ */
font-size:14px;
color:#c1c1c1;
font-family:"Microsoft Yahei","微软雅黑";
}
.top{ width:100%; height:115px; border-top:solid 5px #87abe0;}
.main{ width:1070px; height:auto; margin-left:auto; margin-right:auto;}
.bottom{ width:100%; height:239px; background:#fff url(../images/Login-b.jpg) no-repeat top center; }
.pbottom{ position:absolute; bottom:0px;}
.bottom > p{ color:#aab9c5; font-size:12px; line-height:75px; text-align:center; }
.login-c{ width:100%; height:603px; background:url(../images/login-bg.jpg) no-repeat center center;}
.login-list{ padding-top:95px; padding-left:62px; }
ul.login-list-ul{ width:442px; height:285px; padding-left:30px; padding-top:25px; background:url(../images/login-list-bg.png) no-repeat top left;}
ul.login-list-ul > li > a{ padding-left:26px; width:416px; display:block; height:35px; line-height:35px; background:url(../images/li-icon.png) no-repeat left center; color:#313131; font-size:14px; }
ul.login-list-ul > li > a:hover{ text-decoration:underline;}
.login-form{ background-color:#fbfbfb; border-radius:3px; box-shadow:0px 0px 3px rgba(0,0,0,.15); width:270px; margin-top:90px;}
.login-form-h2{ border-bottom:solid 1px #f2f2f2; text-align:center; color:#565656; font-size:16px; line-height:55px; }
.login-form-tip{ background:url(../images/tip-tline.jpg) repeat-x top left; padding-top:16px; padding-bottom:20px; width:260px; margin-left:auto; margin-right:auto; }
.login-form-tip > p{ color:#9b9b9b; font-size:12px; -webkit-transform:scale(0.95,0.95) ; *font-size:11px; line-height:1.8em;}
.login-form-tip > p > a{ color:#5c5c5b; text-decoration:underline;}
.login-jump{height:110px; padding-top:50px; padding-bottom:50px;}
dl.jump-select-dl{ width:213px; height:38px; border:solid 1px #c1c1c1; margin-left:auto; margin-right:auto;}
dl.jump-select-dl dt{ width:37px; height:28px; padding-top:5px; padding-bottom:5px; float:left; display:inline; background:url(../images/user.png) no-repeat center center;}
dl.jump-select-dl > dt >span{ display:block; width:36px; height:28px; border-right:solid 1px #c1c1c1;}
dl.jump-select-dl dd{ width:176px; height:38px; float:right; display:inline;}
select.jump-select {
width: 176px;
padding-left:15px;
padding-right:30px;
font-family:"Microsoft Yahei","微软雅黑";
font-size:14px;
color: #c1c1c1;
height:38px;
-moz-appearance:none;
appearance: none;
-webkit-appearance: none;
outline:none;
border:none;
background:url(../images/select-arrow.png) no-repeat center right;
/*Chrome和Firefox里面的边框是不一样的,所以复写了一下*/
order: solid 1px #000;
}
.login-jump-btn{ width:215px; height:37px; margin-top:30px; margin-left:auto; margin-right:auto; }
select::-ms-expand { display: none; }
a.jump-btn{ width:135px; height:37px; display:block; background:url(../images/login-jump-btn1.jpg) no-repeat left center;}
a.help-btn{ width:65px; height:37px; display:block; background:url(../images/help-btn.jpg) no-repeat left center;}
.login-eduroam{ padding-top:65px; height:465px;}
.login-eduroam-form{ width:462px; height:465px; margin-left:auto; margin-right:auto; background-color:#fdfcfc; border-radius:3px; box-shadow:0px 0px 3px rgba(0,0,0,.15); }
.login-eduroam-form > h2{ color:#565656; font-size:18px; padding-top:12px; line-height:2em; text-align:center;}
.login-eduroam-form > h3{ width:100%; background:url(../images/line2.jpg) repeat-x left center; height:20px; text-align:center; }
.login-eduroam-form > h3 > span{color:#85b4ed; font-family:Arial; font-size:12px; -webkit-transform:scale(0.95,0.95) ; *font-size:11px; line-height:1.8em; text-transform:uppercase; background-color:#fcfcfc; display:inline-block; padding-left:10px; padding-right:10px;}
.login-eduroam-tip{background: url(../images/tip-tline.jpg) repeat-x top left; padding-top:15px; padding-bottom:15px; text-align:center;}
ul.eduroam-ul{ margin-left:60px; width:315px;}
ul.eduroam-ul > li > a{ width:300px; padding-left:15px; display:block; text-align:left; background:url(../images/eduroam-li.png) no-repeat left center; color:#959595; font-size:12px; line-height:20px;}
ul.eduroam-ul > li > a > span{ color:#729dd1; font-family:Arial; font-size:12px; -webkit-transform:scale(0.95,0.95) ; *font-size:11px; text-transform:uppercase; display:inline-block; padding-left:5px;}
.login-eduroam-line{ width:346px; height:auto; margin-left:auto; margin-right:auto; margin-top:10px;}
a.login-btn{ width:346px; height:44px; margin-bottom:25px; margin-top:35px; display:block; background:url(../images/login-btn.png) no-repeat top center; }
dl.login-eduroam-txt{ border:solid 1px #c1c1c1; height:38px; width:344px; margin-top:25px;}
dl.login-eduroam-txt dt{ width:37px; height:38px; float:left; display:inline;}
dl.login-eduroam-txt dd{ width:305px; height:28px; padding-top:5px; padding-bottom:5px; float:right; display:inline;}
dl.login-eduroam-txt-user dt{ background:url(../images/user.png) no-repeat center center;}
dl.login-eduroam-txt-password dt{ background:url(../images/password.png) no-repeat center center;}
.login-eduroam-input{ border-left:solid 1px #c1c1c1; width:284px; height:28px; padding:0px 10px; margin:0px; border-bottom:0px; border-right:0px; border-top:0px; outline:none; font-size:14px; line-height:28px; color:#565656;}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<html class="no-js" xmlns:th="http://www.w3.org/1999/xhtml"> <!--<![endif]-->
<head>
<meta charset="utf-8" />
<!--<meta http-equiv="X-UA-Compatible" content="IE=edge">-->
<meta content="" name="description" />
<meta content="width=device-width, initial-scale=1" name="viewport" />
<title></title>
<!--<script src="../js/vendor/modernizr-2.6.2.min.js"></script>-->
</head>
<body>
<span th:text="${message}"></span>
</body></html>
\ No newline at end of file
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<html class="no-js" xmlns:th="http://www.w3.org/1999/xhtml"> <!--<![endif]-->
<head>
<meta charset="utf-8" />
<!--<meta http-equiv="X-UA-Compatible" content="IE=edge">-->
<meta content="" name="description" />
<meta content="width=device-width, initial-scale=1" name="viewport" />
<title>上海教育认证平台</title>
<!-- <link type="text/css" rel="stylesheet" href="./css/css.css" />
<script src="./js/jquery.js" type="text/javascript"></script> -->
<link type="text/css" rel="stylesheet" th:href="@{/static/css/css.css}" />
<script th:src="@{/static/js/jquery.js}" type="text/javascript"></script>
</head>
<body>
<script th:inline="javascript">
/*<![CDATA[*/
var loginType = [[${loginType}]];
var ctxPath = /*[[@{/}]]*/ '';
/*]]>*/
</script>
<script>
//判断是否为金山教育阅读平台访问
if (loginType !== null) {
var args = new Object();
var query = location.search.substring(1);
var param = query.split("&");
for (var i = 0; i < param.length; i++) {
var pos = param[i].indexOf('=');
if (pos == -1) {
continue;
}
var argname = param[i].substring(0, pos);
var value = param[i].substring(pos + 1);
args[argname] = unescape(value);
}
var url = unescape(args['return']) + "&entityID=https://idp.jsedu.sh.cn/idp/shibboleth";
var idp = $("#ddl_selectidp").find("option:selected").html();
idp = idp.substr(3);
//document.location = url;
window.location.href = ctxPath + "auth/tologin?idp="+idp+"&loginUrl="; + encodeURIComponent(url);
}
// 列表选择idp跳转事件
function bfsubmit() {
if ($("#ddl_selectidp").val() != "0") {
var args = new Object();
var query = location.search.substring(1); //获取查询串
var param = query.split("&");
for (var i = 0; i < param.length; i++) {
var pos = param[i].indexOf('='); //查找name=value
if (pos == -1) { //如果没有找到就跳过
continue;
}
var argname = param[i].substring(0, pos); //提取name
var value = param[i].substring(pos + 1); //提取value
args[argname] = unescape(value); //存为属性
}
var url = unescape(args['return']) + "&entityID=" + $("#ddl_selectidp").val();
var idp = $("#ddl_selectidp").find("option:selected").html();
idp = idp.substr(3);
//document.location = url;
window.location.href = ctxPath + "auth/tologin?idp="+idp+"&loginUrl="; + encodeURIComponent(url);
} else {
alert("请选择您所在的学校");
}
}
</script>
<div class="top">
<div class="main">
<a><img th:src="@{/static/images/Rlogo.jpg}" /></a>
</div>
</div>
<div class="login-c">
<div class="main">
<div class="login-list fl">
<ul class="login-list-ul">
</ul>
</div>
<div class="login-form fr">
<h2 class="login-form-h2">用户登录</h2>
<div class="login-jump">
<div class="login-jump-select">
<dl class="jump-select-dl clearfix">
<dt>
<span></span>
</dt>
<dd>
<select name="ddl_selectidp" id="ddl_selectidp" class="jump-select">
<option value="0">选择您所在的学校</option>
<option value="https://idp.shec.edu.cn/idp/shibboleth">01:上海市教委</option>
<option value="https://idpfudan.fudan.edu.cn/idp/shibboleth">02:复旦大学</option>
<option value="https://idp.ecnu.edu.cn/idp/shibboleth">04:华东师范大学</option>
<option value="https://idp.ecust.edu.cn/idp/shibboleth">05:华东理工大学</option>
<option value="https://idp.shisu.edu.cn/idp/shibboleth">06:上海外国语大学</option>
<option value="https://idp.dhu.edu.cn/idp/shibboleth">07:东华大学</option>
<option value="https://idpcarsi.shufe.edu.cn/idp/shibboleth">08:上海财经大学</option>
<option value="https://idp.usst.edu.cn/idp/shibboleth">09:上海理工大学</option>
<option value="https://idp.shiep.edu.cn/idp/shibboleth">10:上海电力学院</option>
<option value="https://idp.shu.edu.cn/idp/shibboleth">11:上海大学</option>
<option value="https://idp.shnu.edu.cn/idp/shibboleth">12:上海师范大学</option>
<option value="https://jaccount.sjtu.edu.cn/idp/shibboleth">15:上海交通大学</option>
<option value="https://idp.shmtu.edu.cn/idp/shibboleth">16:上海海事大学</option>
<option value="https://idp-carsi.shou.edu.cn/idp/shibboleth">17:上海海洋大学</option>
<option value="https://idp.sspu.edu.cn/idp/shibboleth">18:上海第二工业大学</option>
<option value="https://idp.sandau.edu.cn/idp/shibboleth">19:上海杉达学院</option>
<option value="https://idp.sdju.edu.cn/idp/shibboleth">20:上海电机学院</option>
<option value="https://idp.shsmu.edu.cn/idp/shibboleth">21:上海交通大学医学院</option>
<option value="https://idp.shcc.edu.cn/idp/shibboleth">22:上海海关学院</option>
<option value="https://idp.sbs.edu.cn/idp/shibboleth">23:上海商学院</option>
<option value="https://idp.gench.edu.cn/idp/shibboleth">24:上海建桥学院</option>
<option value="https://idp.smmu.edu.cn/idp/shibboleth">25:海军军医大学</option>
<option value="https://idp-carsi.suibe.edu.cn/idp/shibboleth">26:上海对外经贸大学</option>
<option value="https://idp.sus.edu.cn/idp/shibboleth">27:上海体育学院</option>
<option value="https://idp.esu.edu.cn/idp/shibboleth">28:上海东海职业技术学院</option>
<option value="https://idp.shafc.edu.cn/idp/shibboleth">29:上海农林职业技术学院</option>
<option value="https://idp.sicfl.edu.cn/idp/shibboleth">30:上海工商外国语职业学院</option>
<option value="https://idp.shjgu.edu.cn/idp/shibboleth">31:上海济光职业技术学院</option>
<option value="https://idp.sou.edu.cn/idp/shibboleth">32:上海开放大学</option>
<option value="https://idp.sumhs.edu.cn/idp/shibboleth">33:上海健康医学院</option>
<option value="https://idp.ecupl.edu.cn/idp/shibboleth">34:华东政法大学</option>
<option value="https://idp-sma.cloud.sh.edu.cn/idp/shibboleth">35:上海海事职业技术学院</option>
<option value="https://idp.sitsh.edu.cn/idp/shibboleth">36:上海旅游高等专科学校</option>
<option value="https://idp.shpc.edu.cn/idp/shibboleth">37:上海公安学院</option>
<option value="https://idp-shec.cloud.sh.edu.cn/idp/shibboleth">38:认证中心测试子域</option>
<option value="https://idp-xwcb.cloud.sh.edu.cn/idp/shibboleth">39:上海新闻出版职业技术学校</option>
<option value="https://idp-shwmcj.cloud.sh.edu.cn/idp/shibboleth">40:上海市贸易学校</option>
<option value="https://idp-scasqhwz.cloud.sh.edu.cn/idp/shibboleth">41:上海商业会计学校</option>
<option value="https://idp-shnhzx.cloud.sh.edu.cn/idp/shibboleth">42:上海市南湖职校</option>
<option value="https://idp-sems.cloud.sh.edu.cn/idp/shibboleth">43:上海市经济管理学校</option>
<option value="https://idp-sthu.cloud.sh.edu.cn/idp/shibboleth">44:上海师范大学天华学院</option>
<option value="https://idp-sjxqzx.cloud.sh.edu.cn/idp/shibboleth">51:上海市松江区新桥职业技术学校</option>
<option value="https://idp-qpzx.cloud.sh.edu.cn/idp/shibboleth">52:上海市青浦区职业学校</option>
<option value="https://idp.sit.edu.cn/idp/shibboleth">53:上海应用技术大学</option>
<option value="https://idp.scst.edu.cn/idp/shibboleth">54:上海科学技术职业学院</option>
<option value="https://idp.xdsisu.edu.cn/idp/shibboleth">55:上海外国语大学贤达经济人文学院</option>
<option value="https://idp.firstjob.com.cn/idp/shibboleth">56:学生事务中心</option>
<option value="https://idp.hpe.cn/idp/shibboleth">57:黄浦区教育信息中心</option>
<option value="https://idp.chneic.sh.cn/idp/shibboleth">58:长宁区教育信息中心</option>
<option value="https://idp.sjedu.cn/idp/shibboleth">59:松江智慧教育</option>
<option value="https://idp.mhedu.sh.cn/idp/shibboleth">60:闵行区教育局信息中心</option>
<option value="https://idp.xhedu.sh.cn/idp/shibboleth">61:徐汇教育</option>
<option value="https://idp.qpedu.cn/idp/shibboleth">62:青浦教育</option>
<option value="https://idp.jsedu.sh.cn/idp/shibboleth">63:金山教育</option>
<option value="https://idp-cmjy.cloud.sh.edu.cn/idp/shibboleth">64:崇明教育</option>
<option value="https://idp.pte.sh.cn/idp/shibboleth">66:普陀教育</option>
<option value="https://idp-age03.cloud.sh.edu.cn/idp/shibboleth">70:学前03子域</option>
<option value="https://idp-huiyuan.cloud.sh.edu.cn/idp/shibboleth">72:慧源共享认证子域</option>
<option value="https://idp-age06.cloud.sh.edu.cn/idp/shibboleth">73:学前教育认证</option>
<option value="https://idp-zzyrz.cloud.sh.edu.cn/idp/shibboleth">75:中职开放课程云认证</option>
<option value="https://stu-idp.edu.sh.cn/idp/shibboleth">76:电教馆-idp</option>
</select>
</dd>
</dl>
</div>
<div class="login-jump-btn">
<table cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="left"><a href="#" class="jump-btn" onclick="bfsubmit();"></a></td>
<td align="right"><a href="#" class="help-btn"></a></td>
</tr>
</table>
</div>
</div>
<div class="login-form-tip">
<p>建议使用IE10.0及以上版本浏览器或同类浏览器,</p>
<p>建议使用1024×768及以上分辨率浏览,</p>
</div>
</div>
<div class="clear"></div>
</div>
</div>
<div class="bottom">
<p>版权所有&copy;上海教育认证中心</p>
</div>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<html class="no-js" xmlns:th="http://www.w3.org/1999/xhtml"> <!--<![endif]-->
<head>
<meta charset="utf-8" />
<!--<meta http-equiv="X-UA-Compatible" content="IE=edge">-->
<meta content="" name="description" />
<meta content="width=device-width, initial-scale=1" name="viewport" />
<title>上海数字教材运营管理中心</title>
<link rel="stylesheet" th:href="@{/static/css/main_0216.css}"/>
<link rel="stylesheet" th:href="@{/static/css/bootstrap.min.css}"/>
<link rel="stylesheet" th:href="@{/static/css/normalize.css}"/>
<script type="text/javascript" th:src="@{/static/js/jquery-1.10.2.min.js}"></script>
<!--<script src="../js/vendor/modernizr-2.6.2.min.js"></script>-->
</head>
<body>
<!--[if lt IE 7]>
<p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a
href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
<![endif]-->
<div class="bg">
<div class="bg-form">
<div class="loginContainer">
<!--<h1>上海数字教材运营管理中心</h1>-->
<div class="login-box">
<!-- <div class="bg-form" style="width: 80%;margin: 0 auto"></div> -->
<button onclick="toLogin(1)" accesskey="l" class="login-btn" id="login-button" name="button" style="outline:0;" type="button">登录
</button>
<div class="login-span"><span>如果您曾经参与上海市中小学数字教材试验项目,</span><span><a style="color:red;"onclick="toLogin(2)">请点击此处使用数字教材账号登录>></a></span></div> <!-- </div> -->
</div>
</div>
</div>
</div>
<script th:inline="javascript">
/*<![CDATA[*/
var loginUrl1 = [[${loginUrl1}]];
var loginUrl2 = [[${loginUrl2}]];
var logId = [[${logId}]];
var ctxPath = /*[[@{/}]]*/ '';
/*]]>*/
</script>
<script type="text/javascript">
function toLogin (num) {
var baseUrl = ctxPath + "auth/tologin?logId="+logId+"&oauthType=";
//var baseUrl = ctxPath + "auth/tologin?oauthType=";
if (num === 1) {
window.location.href = baseUrl+ "dianjiaoguan&loginUrl=" + encodeURIComponent(loginUrl1);
} else if (num === 2) {
window.location.href = baseUrl+ "edenoperation&loginUrl=" + encodeURIComponent(loginUrl2);
}
return false;
}
</script>
</body></html>
\ No newline at end of file
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<html class="no-js" xmlns:th="http://www.w3.org/1999/xhtml"> <!--<![endif]-->
<head>
<meta charset="utf-8" />
<!--<meta http-equiv="X-UA-Compatible" content="IE=edge">-->
<meta content="" name="description" />
<meta content="width=device-width, initial-scale=1" name="viewport" />
<title>上海数字教材运营管理中心</title>
<script type="text/javascript" th:src="@{/static/js/jquery.js}"></script>
<!--<script src="../js/vendor/modernizr-2.6.2.min.js"></script>-->
</head>
<body>
<form th:action="${successPostUrl}" method="post" th:object="${clientDataInfo}">
<input type="hidden" th:value="${clientDataInfo.authUserInfo.id}" name="authUserInfo.id"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.loginName}" name="authUserInfo.loginName"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.realName}" name="authUserInfo.realName"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.userType}" name="authUserInfo.userType"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.source}" name="authUserInfo.source"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.studentId}" name="authUserInfo.studentId"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.studentCode}" name="authUserInfo.studentCode"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.studentStage}" name="authUserInfo.studentStage"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.studentGrade}" name="authUserInfo.studentGrade"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.studentClass}" name="authUserInfo.studentClass"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.studentStageName}" name="authUserInfo.studentStageName"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.studentGradeName}" name="authUserInfo.studentGradeName"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.studentClassName}" name="authUserInfo.studentClassName"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.studentSchoolId}" name="authUserInfo.studentSchoolId"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.studentCodeStatus}" name="authUserInfo.studentCodeStatus"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.studentSchoolCode}" name="authUserInfo.studentSchoolCode"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.studentSchoolName}" name="authUserInfo.studentSchoolName"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.studentRegionCode}" name="authUserInfo.studentRegionCode"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.studentRegionName}" name="authUserInfo.studentRegionName"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.teacherTrainingNo}" name="authUserInfo.teacherTrainingNo"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.teacherTrainingUserName}" name="authUserInfo.teacherTrainingUserName"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.teacherRegionCode}" name="authUserInfo.teacherRegionCode"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.teacherCampusCode}" name="authUserInfo.teacherCampusCode"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.teacherTrainingSchoolType}" name="authUserInfo.teacherTrainingSchoolType"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.teacherStage}" name="authUserInfo.teacherStage"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.teacherGrade}" name="authUserInfo.teacherGrade"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.teacherSubject}" name="authUserInfo.teacherSubject"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.teacherSchoolId}" name="authUserInfo.teacherSchoolId"/>
<input type="hidden" th:value="${clientDataInfo.authUserInfo.teacherSchoolName}" name="authUserInfo.teacherSchoolName"/>
<input type="hidden" th:value="${clientDataInfo.returnUrl}" name="returnUrl"/>
<input type="hidden" th:value="${clientDataInfo.oauthType}" name="oauthType"/>
</form>
<script type="text/javascript">
$(function(){
$("form").submit();
})
</script>
</body></html>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>sh-authcenter</artifactId>
<groupId>com.chineseall.authcenter</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>sh-authcenter-log</artifactId>
<dependencies>
<dependency>
<groupId>cn.sh.chineseall</groupId>
<artifactId>alpha-framework-springboot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
<dependency>
<groupId>cn.sh.chineseall</groupId>
<artifactId>alpha-framework-dao-core</artifactId>
<version>${alpha-framework-version}</version>
</dependency>
<dependency>
<groupId>cn.sh.chineseall</groupId>
<artifactId>alpha-framework-dao-mongo</artifactId>
<version>${alpha-framework-version}</version>
</dependency>
<dependency>
<groupId>cn.sh.chineseall</groupId>
<artifactId>alpha-framework-dao-mysql</artifactId>
<version>${alpha-framework-version}</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
package com.chineseall.authcenter.log.dao;
import cn.sh.chineseall.framework.dao.core.hql.Criteria;
import cn.sh.chineseall.framework.dao.core.hql.Query;
import cn.sh.chineseall.framework.dao.mongo.dao.StaticCacheDimensionDocumentMongoDao;
import com.chineseall.authcenter.log.model.AuthLog;
import org.springframework.stereotype.Component;
import java.util.Date;
import java.util.Map;
@Component
public class AuthLogDao extends StaticCacheDimensionDocumentMongoDao<AuthLog, String> {
public Long countLoginByParams(Map<String, Object> params){
Criteria criteria = new Criteria();
criteria.and("logType").is("login");
if(params.get("authSource")!=null){
criteria.and("authSource").is(params.get("authSource").toString());
}
if(params.get("oauthType")!=null){
criteria.and("oauthType").is(params.get("oauthType").toString());
}
if(params.get("loginSuccessFlag")!=null){
criteria.and("loginSuccessFlag").is(Boolean.valueOf(params.get("loginSuccessFlag").toString()));
}
if(params.get("getUserInfoSuccessFlag")!=null){
criteria.and("getUserInfoSuccessFlag").is(Boolean.valueOf(params.get("getUserInfoSuccessFlag").toString()));
}
if(params.get("userType")!=null){
criteria.and("logUserInfo.userType").is(params.get("userType").toString());
}
if(params.get("beginTime")!=null){
criteria.and("createTime").gte((Date) params.get("beginTime"));
}
if(params.get("endTime")!=null){
criteria.lte((Date) params.get("endTime"));
}
Query query = Query.query(criteria);
return count(query);
}
public Long countLogoutByParams(Map<String, Object> params){
Criteria criteria = new Criteria();
criteria.and("logType").is("logout");
Query query = Query.query(criteria);
return count(query);
}
}
package com.chineseall.authcenter.log.enums;
import lombok.Getter;
public enum LogType {
login("login","登录操作"),
logout("logout","登出操作");
@Getter
private final String code;
@Getter
private final String description;
LogType(String code, String description) {
this.code = code;
this.description = description;
}
public static LogType getValue(String name) {
try {
return LogType.valueOf(name);
} catch (Exception ex) {
return null;
}
}
}
package com.chineseall.authcenter.log.model;
import cn.sh.chineseall.framework.dao.core.CacheDimensionDocument;
import cn.sh.chineseall.framework.dao.core.annotation.*;
import cn.sh.chineseall.framework.dao.core.annotation.mongo.DocumentCollection;
import cn.sh.chineseall.framework.dao.core.annotation.mongo.DocumentDatabase;
import com.chineseall.authcenter.log.enums.LogType;
import lombok.Data;
import java.util.Date;
import java.util.Map;
@Data
@DocumentConnection(configName = "mongo")
@DocumentDatabase(database = "splog")
@DocumentCollection(collection = "auth_log")
public class AuthLog implements CacheDimensionDocument {
@DocumentId
private String id;
@DocumentCreateTimestamp
private Date createTime;
@DocumentUpdateTimestamp
private Date updateTime;
@DocumentField
private LogType logType; // 日志类型
@DocumentField
private Boolean loginSuccessFlag;
@DocumentField
private String clientId;
@DocumentField
private String clientName;
@DocumentField
private String idp;
@DocumentField
private String shibProvider;
@DocumentField
private String returnUrl; // 登录成功回调地址
@DocumentField
private Map<String, Object> userInfoMap;
@Override
public String[] generateCacheDimensions() {
return new String[0];
}
}
package com.chineseall.authcenter.log.model;
import lombok.Data;
import java.io.Serializable;
@Data
public class LogUserInfo implements Serializable {
private String userId;
private String realName;
private String userType;
private String schoolId;
private String schoolName;
private String teacherTrainingNo;
private String studentCode;
}
package com.chineseall.authcenter.log.service;
import com.chineseall.authcenter.log.model.AuthLog;
import java.util.Map;
public interface AuthLogService {
AuthLog getById(String id);
void save(AuthLog authLog);
Long countLoginByParams(Map<String, Object> params);
Long countLogoutByParams(Map<String, Object> params);
}
package com.chineseall.authcenter.log.service.impl;
import com.chineseall.authcenter.log.dao.AuthLogDao;
import com.chineseall.authcenter.log.model.AuthLog;
import com.chineseall.authcenter.log.service.AuthLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.Map;
import java.util.UUID;
@Service
public class AuthLogServiceImpl implements AuthLogService {
@Autowired
private AuthLogDao authLogDao;
@Override
public AuthLog getById(String id) {
return authLogDao.load(id);
}
@Override
public void save(AuthLog authLog) {
if(authLog.getId() != null){
authLog.setUpdateTime(new Date());
authLogDao.replace(authLog);
} else{
authLog.setId(UUID.randomUUID().toString());
authLog.setCreateTime(new Date());
authLogDao.insert(authLog);
}
}
@Override
public Long countLoginByParams(Map<String, Object> params) {
return authLogDao.countLoginByParams(params);
}
@Override
public Long countLogoutByParams(Map<String, Object> params) {
return authLogDao.countLogoutByParams(params);
}
}
#Generated by Apache Maven
#Mon Jul 27 18:29:39 CST 2020
version=1.0-SNAPSHOT
groupId=com.chineseall.authcenter
artifactId=sh-authcenter-log
com\chineseall\authcenter\log\enums\LogType.class
com\chineseall\authcenter\log\model\AuthLog.class
com\chineseall\authcenter\log\dao\AuthLogDao.class
com\chineseall\authcenter\log\service\AuthLogService.class
com\chineseall\authcenter\log\service\impl\AuthLogServiceImpl.class
com\chineseall\authcenter\log\model\LogUserInfo.class
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4" />
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment