spring boot init

spring boot init
This commit is contained in:
shimingxy
2019-09-04 23:47:22 +08:00
parent 6181f5d657
commit fb15e2b070
1192 changed files with 2693 additions and 4070 deletions

View File

@@ -0,0 +1,19 @@
package org.maxkey;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
@SpringBootApplication
public class MaxKeyApplication extends SpringBootServletInitializer {
public static void main(String[] args) {
SpringApplication.run(MaxKeyApplication.class, args);
}
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
return application.sources(MaxKeyApplication.class);
}
}

View File

@@ -0,0 +1,10 @@
package org.maxkey;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.ImportResource;
@Configuration
@ImportResource(locations={"classpath:spring/maxkey.xml"})
public class MaxKeyConfig {
}

View File

@@ -79,11 +79,6 @@ public class AppListController{
WebContext.setAttribute(app.getId(), app.getIcon());
}
if(appList.size()%5>0){
for(int i=0;i<=appList.size()%5;i++){
appList.add(new UserApplications());
}
}
return appList;
}

View File

@@ -54,7 +54,7 @@ public class OneTimePasswordController {
@RequestMapping(value={"/timebased"})
public ModelAndView timebased(){
ModelAndView modelAndView=new ModelAndView("otp/timeBased");
ModelAndView modelAndView=new ModelAndView("safe/timeBased");
UserInfo userInfo=WebContext.getUserInfo();
String sharedSecret=passwordReciprocal.decoder(userInfo.getSharedSecret());
timeBasedKeyUriFormat.setSecret(sharedSecret);
@@ -84,7 +84,7 @@ public class OneTimePasswordController {
@RequestMapping(value={"/counterbased"})
public ModelAndView counterbased(){
ModelAndView modelAndView=new ModelAndView("otp/counterBased");
ModelAndView modelAndView=new ModelAndView("safe/counterBased");
UserInfo userInfo=WebContext.getUserInfo();
String sharedSecret=passwordReciprocal.decoder(userInfo.getSharedSecret());
counterBasedKeyUriFormat.setSecret(sharedSecret);
@@ -117,7 +117,7 @@ public class OneTimePasswordController {
@RequestMapping(value={"/hotp"})
public ModelAndView hotp(){
ModelAndView modelAndView=new ModelAndView("otp/hotp");
ModelAndView modelAndView=new ModelAndView("safe/hotp");
UserInfo userInfo=WebContext.getUserInfo();
String sharedSecret=passwordReciprocal.decoder(userInfo.getSharedSecret());
hotpKeyUriFormat.setSecret(sharedSecret);

View File

@@ -67,9 +67,9 @@ public class LoginEndpoint {
@Qualifier("userInfoService")
UserInfoService userInfoService;
@Autowired
/*@Autowired
@Qualifier("wsFederationService")
WsFederationService wsFederationService;
WsFederationService wsFederationService;*/
@Autowired
@Qualifier("authenticationProvider")
@@ -117,7 +117,7 @@ public class LoginEndpoint {
if(applicationConfig.getLoginConfig().isWsFederation()&&
StringUtils.isNotEmpty(wsFederationWA) &&
wsFederationWA.equalsIgnoreCase(WsFederationConstants.WSIGNIN)){
isAuthenticated=wsFederationService.login(wsFederationWA,wsFederationWResult,request);
//isAuthenticated=wsFederationService.login(wsFederationWA,wsFederationWResult,request);
}
}