Java 类org.springframework.security.web.savedrequest.RequestCache 实例源码

项目:motech    文件:SecurityRuleBuilder.java   
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;
}
项目:theskeleton    文件:SocialConfig.java   
@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();
    };
}
项目:SpringMango    文件:MyAuthenticationSuccessHandler.java   
public RequestCache getRequestCache() {
    return requestCache;
}
项目:SpringMango    文件:MyAuthenticationSuccessHandler.java   
public void setRequestCache(RequestCache requestCache) {
    this.requestCache = requestCache;
}
项目:OMIPlatform    文件:TZAuthenticationSuccessHandler.java   
@Override
public void setRequestCache(RequestCache requestCache) {
    super.setRequestCache(requestCache);
}
项目:nixmash-blog    文件:SocialSignInAdapter.java   
@Inject
public SocialSignInAdapter(RequestCache requestCache) {
    this.requestCache = requestCache;
}
项目:springboot-security-wechat    文件:MyAuthenticationSuccessHandler.java   
public void setRequestCache(RequestCache requestCache) {
    this.requestCache = requestCache;
}
项目:dawn-marketplace-server    文件:SimpleSignInAdapter.java   
@Inject
public SimpleSignInAdapter(RequestCache requestCache) {
    this.requestCache = requestCache;
}
项目:jeet    文件:LoginSuccessHandler.java   
@Override
public void setRequestCache(RequestCache requestCache) {
    super.setRequestCache(requestCache);
}
项目:spring-security-stateless    文件:CookieSavedRequestAwareAuthenticationSuccessHandler.java   
public CookieSavedRequestAwareAuthenticationSuccessHandler(RequestCache requestCache) {
    setRequestCache(requestCache);
}
项目:tgi-commons    文件:RestSuccessHandler.java   
public void setRequestCache(RequestCache requestCache) {
    this.requestCache = requestCache;
}
项目:shinyproxy    文件:SocialConfiguration.java   
@Inject
public SimpleSignInAdapter(RequestCache requestCache) {
    this.requestCache = requestCache;
}
项目:aggregate    文件:TargetUrlRequestAwareAuthenticationSuccessHandler.java   
public void setRequestCache(RequestCache requestCache) {
    this.requestCache = requestCache;
}
项目:powop    文件:RestSavedRequestAwareAuthenticationSuccessHandler.java   
public void setRequestCache(RequestCache requestCache) {
    this.requestCache = requestCache;
}
项目:motech    文件:SecurityRuleBuilder.java   
private void addRequestCacheFilter(List<Filter> filters, RequestCache requestCache) {
    RequestCacheAwareFilter cacheFilter = new RequestCacheAwareFilter(requestCache);
    filters.add(cacheFilter);
}
项目:editor-de-servicos    文件:CustomLoginSuccessHandler.java   
@Override
public void setRequestCache(RequestCache requestCache) {
    this.requestCache = requestCache;
    super.setRequestCache(requestCache);
}
项目:zxl    文件:SavedRequestAwareAuthenticationSuccessHandler.java   
public void setRequestCache(RequestCache requestCache) {
    this.requestCache = requestCache;
}
项目:vaadin4spring    文件:SavedRequestAwareVaadinAuthenticationSuccessHandler.java   
public void setRequestCache(RequestCache requestCache) {
    this.requestCache = requestCache;
}
项目:lolibox    文件:SimpleSignInAdapter.java   
@Inject
public SimpleSignInAdapter(RequestCache requestCache) {
    this.requestCache = requestCache;
}
项目:profile    文件:AuthenticationRequiredHandlerImpl.java   
/**
 * Sets the cache where the current request is saved.
 */
public void setRequestCache(RequestCache requestCache) {
    this.requestCache = requestCache;
}
项目:profile    文件:LoginSuccessHandlerImpl.java   
public void setRequestCache(RequestCache requestCache) {
    this.requestCache = requestCache;
}
项目:profile    文件:SavedRequestAwareProcessor.java   
public void setRequestCache(RequestCache requestCache) {
    this.requestCache = requestCache;
}
项目:javaconfig-ftw    文件:SimpleSignInAdapter.java   
@Inject
public SimpleSignInAdapter(RequestCache requestCache) {
    this.requestCache = requestCache;
}
项目:LearningAnalyticsProcessor    文件:SecurityConfig.java   
@Bean
public RequestCache requestCache() {
  return new HttpSessionRequestCache();
}
项目:springrest-angularjs    文件:MySavedRequestAwareAuthenticationSuccessHandler.java   
public void setRequestCache(final RequestCache requestCache) {
    this.requestCache = requestCache;
}
项目:spring-greenhouse-clickstart    文件:AccountSignInAdapter.java   
@Inject
public AccountSignInAdapter(AccountRepository accountRepository, RequestCache requestCache) {
    this.accountRepository = accountRepository;
    this.requestCache = requestCache;
}
项目:spring-greenhouse-clickstart    文件:SocialConfig.java   
/**
     * The Spring MVC Controller that coordinates "sign-in with {provider}" attempts.
     * @param accountRepository the account repository that can load user Account objects given an account id.
     */
//  @Bean
    public ProviderSignInController providerSignInController(AccountRepository accountRepository, RequestCache requestCache) {
        return new ProviderSignInController(connectionFactoryLocator(), usersConnectionRepository(), new AccountSignInAdapter(accountRepository, requestCache));
    }
项目:spring-social-showcase-sec-appengine    文件:SimpleSignInAdapter.java   
@Inject
public SimpleSignInAdapter(RequestCache requestCache) {
    this.requestCache = requestCache;
}
项目:communote-server    文件:CommunoteAuthenticationSuccessHandler.java   
/**
 * Set a request cache to look for a redirection target if no target URL was provided by a
 * request parameter. By default a {@link HttpSessionRequestCache} will be used.
 *
 * @param requestCache
 *            the cache to use
 */
public void setRequestCache(RequestCache requestCache) {
    this.requestCache = requestCache;
}
项目:oada-ref-impl-java    文件:RestAuthenticationSuccessHandler.java   
/**
 *
 * @param cache - Request cache
 */
public void setRequestCache(RequestCache cache) {
    this.requestCache = cache;
}
项目:tcc-oada    文件:RestAuthenticationSuccessHandler.java   
/**
 *
 * @param cache - Request cache
 */
public void setRequestCache(RequestCache cache) {
    this.requestCache = cache;
}