spring boot init
spring boot init
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
10
maxkey-web-maxkey/src/main/java/org/maxkey/MaxKeyConfig.java
Normal file
10
maxkey-web-maxkey/src/main/java/org/maxkey/MaxKeyConfig.java
Normal 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 {
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user