org.springframework.session.web.http.CookieHttpSessionStrategy Java Examples

The following examples show how to use org.springframework.session.web.http.CookieHttpSessionStrategy. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: HttpSessionConfig.java    From ZTuoExchange_framework with MIT License 5 votes vote down vote up
@Bean
public HttpSessionStrategy httpSessionStrategy(){
 HeaderHttpSessionStrategy headerSession = new HeaderHttpSessionStrategy();
 CookieHttpSessionStrategy cookieSession = new CookieHttpSessionStrategy();
 headerSession.setHeaderName("x-auth-token");
 return new SmartHttpSessionStrategy(cookieSession,headerSession);
}
 
Example #2
Source File: HttpSessionConfig.java    From ZTuoExchange_framework with MIT License 5 votes vote down vote up
@Bean
public HttpSessionStrategy httpSessionStrategy(){
 HeaderHttpSessionStrategy headerSession = new HeaderHttpSessionStrategy();
 CookieHttpSessionStrategy cookieSession = new CookieHttpSessionStrategy();
 headerSession.setHeaderName("x-auth-token");
 return new SmartHttpSessionStrategy(cookieSession,headerSession);
}
 
Example #3
Source File: HttpSessionConfig.java    From ZTuoExchange_framework with MIT License 5 votes vote down vote up
@Bean
public HttpSessionStrategy httpSessionStrategy(){
 HeaderHttpSessionStrategy headerSession = new HeaderHttpSessionStrategy();
 CookieHttpSessionStrategy cookieSession = new CookieHttpSessionStrategy();
 headerSession.setHeaderName("x-auth-token");
 return new SmartHttpSessionStrategy(cookieSession,headerSession);
}
 
Example #4
Source File: HttpSessionConfig.java    From ZTuoExchange_framework with MIT License 5 votes vote down vote up
@Bean
public HttpSessionStrategy httpSessionStrategy(){
 HeaderHttpSessionStrategy headerSession = new HeaderHttpSessionStrategy();
 CookieHttpSessionStrategy cookieSession = new CookieHttpSessionStrategy();
 headerSession.setHeaderName("x-auth-token");
 return new SmartHttpSessionStrategy(cookieSession,headerSession);
}
 
Example #5
Source File: HttpSessionConfig.java    From ZTuoExchange_framework with MIT License 5 votes vote down vote up
@Bean
public HttpSessionStrategy httpSessionStrategy(){
 HeaderHttpSessionStrategy headerSession = new HeaderHttpSessionStrategy();
 CookieHttpSessionStrategy cookieSession = new CookieHttpSessionStrategy();
 headerSession.setHeaderName("x-auth-token");
 return new SmartHttpSessionStrategy(cookieSession,headerSession);
}
 
Example #6
Source File: HttpSessionConfig.java    From ZTuoExchange_framework with MIT License 5 votes vote down vote up
@Bean
public HttpSessionStrategy httpSessionStrategy(){
 HeaderHttpSessionStrategy headerSession = new HeaderHttpSessionStrategy();
 CookieHttpSessionStrategy cookieSession = new CookieHttpSessionStrategy();
 headerSession.setHeaderName("x-auth-token");
 return new SmartHttpSessionStrategy(cookieSession,headerSession);
}
 
Example #7
Source File: HttpSessionConfig.java    From ZTuoExchange_framework with MIT License 5 votes vote down vote up
@Bean
public HttpSessionStrategy httpSessionStrategy(){
 HeaderHttpSessionStrategy headerSession = new HeaderHttpSessionStrategy();
 CookieHttpSessionStrategy cookieSession = new CookieHttpSessionStrategy();
 headerSession.setHeaderName("x-auth-token");
 return new SmartHttpSessionStrategy(cookieSession,headerSession);
}
 
Example #8
Source File: HttpSessionConfig.java    From ZTuoExchange_framework with MIT License 5 votes vote down vote up
@Bean
public HttpSessionStrategy httpSessionStrategy(){
 HeaderHttpSessionStrategy headerSession = new HeaderHttpSessionStrategy();
 CookieHttpSessionStrategy cookieSession = new CookieHttpSessionStrategy();
 headerSession.setHeaderName("x-auth-token");
 return new SmartHttpSessionStrategy(cookieSession,headerSession);
}
 
Example #9
Source File: CustomizableHttpSessionStrategy.java    From onetwo with Apache License 2.0 5 votes vote down vote up
@Override
public void afterPropertiesSet() throws Exception {
	Assert.hasText(strategyHeaderName, "strategyHeaderName must has text!");
	this.headerStrategy = new HeaderHttpSessionStrategy();
	this.headerStrategy.setHeaderName(tokenHeaderName);
	this.cookieStrategy = new CookieHttpSessionStrategy();
	if (cookieSerializer!=null) {
		this.cookieStrategy.setCookieSerializer(cookieSerializer);
	}
}
 
Example #10
Source File: SmartHttpSessionStrategy.java    From ZTuoExchange_framework with MIT License 4 votes vote down vote up
public SmartHttpSessionStrategy(CookieHttpSessionStrategy browser, HeaderHttpSessionStrategy api) {
    this.browser = browser;
    this.api = api;
}
 
Example #11
Source File: SmartHttpSessionStrategy.java    From ZTuoExchange_framework with MIT License 4 votes vote down vote up
public SmartHttpSessionStrategy(CookieHttpSessionStrategy browser, HeaderHttpSessionStrategy api) {
    this.browser = browser;
    this.api = api;
}