本文整理汇总了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;
}
示例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();
};
}
示例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;
}
示例5: setRequestCache
import org.springframework.security.web.savedrequest.RequestCache; //导入依赖的package包/类
public void setRequestCache(RequestCache requestCache) {
this.requestCache = requestCache;
}
示例6: setRequestCache
import org.springframework.security.web.savedrequest.RequestCache; //导入依赖的package包/类
@Override
public void setRequestCache(RequestCache requestCache) {
super.setRequestCache(requestCache);
}
示例7: SocialSignInAdapter
import org.springframework.security.web.savedrequest.RequestCache; //导入依赖的package包/类
@Inject
public SocialSignInAdapter(RequestCache requestCache) {
this.requestCache = requestCache;
}
示例8: setRequestCache
import org.springframework.security.web.savedrequest.RequestCache; //导入依赖的package包/类
public void setRequestCache(RequestCache requestCache) {
this.requestCache = requestCache;
}
示例9: SimpleSignInAdapter
import org.springframework.security.web.savedrequest.RequestCache; //导入依赖的package包/类
@Inject
public SimpleSignInAdapter(RequestCache requestCache) {
this.requestCache = requestCache;
}
示例10: setRequestCache
import org.springframework.security.web.savedrequest.RequestCache; //导入依赖的package包/类
@Override
public void setRequestCache(RequestCache requestCache) {
super.setRequestCache(requestCache);
}
示例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);
}
示例13: setRequestCache
import org.springframework.security.web.savedrequest.RequestCache; //导入依赖的package包/类
@Override
public void setRequestCache(RequestCache requestCache) {
this.requestCache = requestCache;
super.setRequestCache(requestCache);
}
示例14: SimpleSignInAdapter
import org.springframework.security.web.savedrequest.RequestCache; //导入依赖的package包/类
@Inject
public SimpleSignInAdapter(RequestCache requestCache) {
this.requestCache = requestCache;
}
示例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;
}