当前位置: 首页>>代码示例>>Java>>正文


Java RequestCache类代码示例

本文整理汇总了Java中org.springframework.security.web.savedrequest.RequestCache的典型用法代码示例。如果您正苦于以下问题:Java RequestCache类的具体用法?Java RequestCache怎么用?Java RequestCache使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


RequestCache类属于org.springframework.security.web.savedrequest包,在下文中一共展示了RequestCache类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: addFilters

import org.springframework.security.web.savedrequest.RequestCache; //导入依赖的package包/类
private List<Filter> addFilters(MotechURLSecurityRule securityRule) throws ServletException {
    List<Filter> filters = new ArrayList<>();

    SecurityContextRepository contextRepository = new HttpSessionSecurityContextRepository();
    RequestCache requestCache = new HttpSessionRequestCache();

    addSecureChannel(filters, securityRule.getProtocol());
    addSecurityContextPersistenceFilter(filters, contextRepository);
    addLogoutFilter(filters, securityRule);
    addAuthenticationFilters(filters, securityRule);
    addRequestCacheFilter(filters, requestCache);
    addSecurityContextHolderAwareRequestFilter(filters);
    addAnonymousAuthenticationFilter(filters);
    addSessionManagementFilter(filters, contextRepository);
    addExceptionTranslationFilter(filters, requestCache, securityRule.isRest());
    addFilterSecurityInterceptor(filters, securityRule);

    return filters;
}
 
开发者ID:motech,项目名称:motech,代码行数:20,代码来源:SecurityRuleBuilder.java

示例2: signInAdapter

import org.springframework.security.web.savedrequest.RequestCache; //导入依赖的package包/类
@Bean
public SignInAdapter signInAdapter(UserDetailsService userDetailsService) {
	RequestCache requestCache = new HttpSessionRequestCache();
	return (userId, connection, request) -> {
		UserDetails userDetails = userDetailsService.loadUserByUsername(userId);
		Authentication authentication = new UsernamePasswordAuthenticationToken(userDetails, null, userDetails.getAuthorities());
		SecurityContextHolder.getContext().setAuthentication(authentication);
		SavedRequest savedRequest = requestCache.getRequest(request.getNativeRequest(HttpServletRequest.class), request.getNativeResponse(HttpServletResponse.class));
		return savedRequest == null ? null : savedRequest.getRedirectUrl();
	};
}
 
开发者ID:codenergic,项目名称:theskeleton,代码行数:12,代码来源:SocialConfig.java

示例3: requestCache

import org.springframework.security.web.savedrequest.RequestCache; //导入依赖的package包/类
@Bean
public RequestCache requestCache() {
  return new HttpSessionRequestCache();
}
 
开发者ID:Apereo-Learning-Analytics-Initiative,项目名称:LearningAnalyticsProcessor,代码行数:5,代码来源:SecurityConfig.java

示例4: getRequestCache

import org.springframework.security.web.savedrequest.RequestCache; //导入依赖的package包/类
public RequestCache getRequestCache() {
	return requestCache;
}
 
开发者ID:honghailiang,项目名称:SpringMango,代码行数:4,代码来源:MyAuthenticationSuccessHandler.java

示例5: setRequestCache

import org.springframework.security.web.savedrequest.RequestCache; //导入依赖的package包/类
public void setRequestCache(RequestCache requestCache) {
	this.requestCache = requestCache;
}
 
开发者ID:honghailiang,项目名称:SpringMango,代码行数:4,代码来源:MyAuthenticationSuccessHandler.java

示例6: setRequestCache

import org.springframework.security.web.savedrequest.RequestCache; //导入依赖的package包/类
@Override
public void setRequestCache(RequestCache requestCache) {
    super.setRequestCache(requestCache);
}
 
开发者ID:TZClub,项目名称:OMIPlatform,代码行数:5,代码来源:TZAuthenticationSuccessHandler.java

示例7: SocialSignInAdapter

import org.springframework.security.web.savedrequest.RequestCache; //导入依赖的package包/类
@Inject
public SocialSignInAdapter(RequestCache requestCache) {
	this.requestCache = requestCache;
}
 
开发者ID:mintster,项目名称:nixmash-blog,代码行数:5,代码来源:SocialSignInAdapter.java

示例8: setRequestCache

import org.springframework.security.web.savedrequest.RequestCache; //导入依赖的package包/类
public void setRequestCache(RequestCache requestCache) {
    this.requestCache = requestCache;
}
 
开发者ID:luotuo,项目名称:springboot-security-wechat,代码行数:4,代码来源:MyAuthenticationSuccessHandler.java

示例9: SimpleSignInAdapter

import org.springframework.security.web.savedrequest.RequestCache; //导入依赖的package包/类
@Inject
public SimpleSignInAdapter(RequestCache requestCache) {
	this.requestCache = requestCache;
}
 
开发者ID:Itema-as,项目名称:dawn-marketplace-server,代码行数:5,代码来源:SimpleSignInAdapter.java

示例10: setRequestCache

import org.springframework.security.web.savedrequest.RequestCache; //导入依赖的package包/类
@Override
public void setRequestCache(RequestCache requestCache) {
	super.setRequestCache(requestCache);
}
 
开发者ID:ckwen,项目名称:jeet,代码行数:5,代码来源:LoginSuccessHandler.java

示例11: CookieSavedRequestAwareAuthenticationSuccessHandler

import org.springframework.security.web.savedrequest.RequestCache; //导入依赖的package包/类
public CookieSavedRequestAwareAuthenticationSuccessHandler(RequestCache requestCache) {
    setRequestCache(requestCache);
}
 
开发者ID:AusDTO,项目名称:spring-security-stateless,代码行数:4,代码来源:CookieSavedRequestAwareAuthenticationSuccessHandler.java

示例12: addRequestCacheFilter

import org.springframework.security.web.savedrequest.RequestCache; //导入依赖的package包/类
private void addRequestCacheFilter(List<Filter> filters, RequestCache requestCache) {
    RequestCacheAwareFilter cacheFilter = new RequestCacheAwareFilter(requestCache);
    filters.add(cacheFilter);
}
 
开发者ID:motech,项目名称:motech,代码行数:5,代码来源:SecurityRuleBuilder.java

示例13: setRequestCache

import org.springframework.security.web.savedrequest.RequestCache; //导入依赖的package包/类
@Override
public void setRequestCache(RequestCache requestCache) {
    this.requestCache = requestCache;
    super.setRequestCache(requestCache);
}
 
开发者ID:servicosgovbr,项目名称:editor-de-servicos,代码行数:6,代码来源:CustomLoginSuccessHandler.java

示例14: SimpleSignInAdapter

import org.springframework.security.web.savedrequest.RequestCache; //导入依赖的package包/类
@Inject
public SimpleSignInAdapter(RequestCache requestCache) {
    this.requestCache = requestCache;
}
 
开发者ID:chocotan,项目名称:lolibox,代码行数:5,代码来源:SimpleSignInAdapter.java

示例15: setRequestCache

import org.springframework.security.web.savedrequest.RequestCache; //导入依赖的package包/类
/**
 * Sets the cache where the current request is saved.
 */
public void setRequestCache(RequestCache requestCache) {
    this.requestCache = requestCache;
}
 
开发者ID:craftercms,项目名称:profile,代码行数:7,代码来源:AuthenticationRequiredHandlerImpl.java


注:本文中的org.springframework.security.web.savedrequest.RequestCache类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。