Java 类org.springframework.security.web.csrf.HttpSessionCsrfTokenRepository 实例源码

项目:hojeehdiaderua    文件:SecurityConfig.java   
@Bean
public CsrfTokenRepository csrfTokenRepository() {
    HttpSessionCsrfTokenRepository repository =
            new HttpSessionCsrfTokenRepository();

    repository.setHeaderName("X-XSRF-TOKEN");
    return repository;
}
项目:template-spring-boot-oauth2-wso2-is    文件:App.java   
@Override
protected void configure(HttpSecurity http) throws Exception {
    http.antMatcher("/**")
        .authorizeRequests()
            .antMatchers("/", "/health", "/login**", "/webjars/**").permitAll()
            .anyRequest().authenticated()
        .and().logout().logoutSuccessUrl("/").permitAll()
        .and().csrf().csrfTokenRepository(new HttpSessionCsrfTokenRepository());
}
项目:gwt-bean-validators-example    文件:WebSecurityConfig.java   
/**
 * define csrf header entry.
 *
 * @return csrf header entry
 */
@Bean
public CsrfTokenRepository csrfTokenRepository() {
  final HttpSessionCsrfTokenRepository repository = new HttpSessionCsrfTokenRepository();
  repository.setHeaderName(ResourcePaths.XSRF_HEADER);
  return repository;
}
项目:grassroot-platform    文件:SecurityConfig.java   
@Override
protected void configure(HttpSecurity http) throws Exception {
    log.info("configuring security with USSD gateway: {}", environment.getProperty("grassroot.ussd.gateway", "127.0.0.1"));
    http
            .authorizeRequests()
                .antMatchers("/index").permitAll()
                .antMatchers("/signup").permitAll()
                .antMatchers("/signup/extra").permitAll()
                .antMatchers("/user/recovery").permitAll()
                .antMatchers("/user/recovery/success").permitAll()
                .antMatchers("/grass-root-verification/*").permitAll()
                .antMatchers("/livewire/public/**").permitAll()
                .antMatchers("/cardauth/**").permitAll()
                .antMatchers("/donate/**").permitAll()
                .antMatchers("/ussd/**").access(assembleUssdGatewayAccessString())
                .anyRequest().authenticated()
                .and()
            .formLogin()
                .successHandler(savedRequestAwareAuthenticationSuccessHandler())
                .defaultSuccessUrl("/home")
                .loginPage("/login")
                .loginProcessingUrl("/login")
                .permitAll()
                .and()
            .logout()
                .logoutRequestMatcher(new AntPathRequestMatcher("/logout"))
                .logoutSuccessUrl("/login")
                .permitAll().and()
            .rememberMe()
                .rememberMeServices(rememberMeServices())
                .useSecureCookie(true).and()
            .headers().frameOptions().sameOrigin().and() // in future see if can path restrict this
            .csrf().csrfTokenRepository(new HttpSessionCsrfTokenRepository());
}
项目:spring-data-rest-mvc-react    文件:SecurityConfiguration.java   
private CsrfTokenRepository csrfTokenRepository() {
    HttpSessionCsrfTokenRepository repository = new HttpSessionCsrfTokenRepository();
    /**
     * You'll see references to the X-XSRF-TOKEN header in the javascript code.
     */
    repository.setHeaderName("X-XSRF-TOKEN");
    return repository;
}
项目:orchidae    文件:cfgSecurity.java   
@Bean
protected CsrfTokenRepository csrfTokenRepository()
{
    HttpSessionCsrfTokenRepository repository = new HttpSessionCsrfTokenRepository();
    repository.setHeaderName( "X-XSRF-TOKEN" );
    return repository;
}
项目:alf.io    文件:WebSecurityConfig.java   
@Bean
public CsrfTokenRepository getCsrfTokenRepository() {
    HttpSessionCsrfTokenRepository repository = new HttpSessionCsrfTokenRepository();
    repository.setSessionAttributeName(CSRF_SESSION_ATTRIBUTE);
    repository.setParameterName(CSRF_PARAM_NAME);
    return repository;
}
项目:emergentmud    文件:SecurityConfiguration.java   
private CsrfTokenRepository csrfTokenRepository() {
    HttpSessionCsrfTokenRepository repository = new HttpSessionCsrfTokenRepository();
    repository.setHeaderName("X-XSRF-TOKEN");
    return repository;
}
项目:devops-cstack    文件:SecurityConfiguration.java   
private CsrfTokenRepository csrfTokenRepository() {
    HttpSessionCsrfTokenRepository repository = new HttpSessionCsrfTokenRepository();
    repository.setHeaderName("X-XSRF-TOKEN");
    return repository;
}
项目:JenkinsHue    文件:SecurityConfiguration.java   
private CsrfTokenRepository csrfTokenRepository() {
    HttpSessionCsrfTokenRepository repository = new HttpSessionCsrfTokenRepository();
    repository.setHeaderName("X-XSRF-TOKEN");
    return repository;
}
项目:cloud    文件:ResourceServerConfig.java   
private CsrfTokenRepository csrfTokenRepository() {
    HttpSessionCsrfTokenRepository repository = new HttpSessionCsrfTokenRepository();
    repository.setHeaderName("X-XSRF-TOKEN");
    return repository;
}
项目:DiscussionPortal    文件:DiscussionPortalApplication.java   
private CsrfTokenRepository csrfTokenRepository() {
    HttpSessionCsrfTokenRepository repository = new HttpSessionCsrfTokenRepository();
    log.info(Json.toJson(repository));
    repository.setHeaderName(CSRF_HEADER_NAME);
    return repository;
}
项目:Spring-cloud-gather    文件:CustomWebSecurityConfigurerAdapter.java   
private CsrfTokenRepository csrfTokenRepository() {
    HttpSessionCsrfTokenRepository repository = new HttpSessionCsrfTokenRepository();
    repository.setHeaderName("X-XSRF-TOKEN");
    return repository;
}
项目:oasp-tutorial-sources    文件:WebSecurityBeansConfig.java   
/**
 * This method provides a new instance of {@code CsrfTokenRepository}
 *
 * @return the newly created {@code CsrfTokenRepository}
 */
@Bean
public CsrfTokenRepository csrfTokenRepository() {

  return new HttpSessionCsrfTokenRepository();
}
项目:referenceapp    文件:GatewayApplication.java   
private CsrfTokenRepository csrfTokenRepository() {
    HttpSessionCsrfTokenRepository repository = new HttpSessionCsrfTokenRepository();
    repository.setHeaderName("X-XSRF-TOKEN");
    return repository;
}
项目:OpenViSu    文件:SecurityConfiguration.java   
private CsrfTokenRepository csrfTokenRepository()
{
  HttpSessionCsrfTokenRepository repository = new HttpSessionCsrfTokenRepository();
  repository.setHeaderName("X-XSRF-TOKEN");
  return repository;
}
项目:oma-riista-web    文件:WebSecurityConfig.java   
@Bean
public CsrfTokenRepository csrfTokenRepository() {
    final HttpSessionCsrfTokenRepository repository = new HttpSessionCsrfTokenRepository();
    repository.setHeaderName(CsrfCookieGeneratorFilter.ANGULAR_CSRF_DEFAULT_HEADER_NAME);
    return repository;
}
项目:complete-transaction-management    文件:MainApplication.java   
private CsrfTokenRepository csrfTokenRepository() {
    HttpSessionCsrfTokenRepository repository = new HttpSessionCsrfTokenRepository();
    repository.setHeaderName("X-XSRF-TOKEN");
    return repository;
}
项目:cityoffice    文件:SecurityConfiguration.java   
@SuppressWarnings("unused")
private CsrfTokenRepository csrfTokenRepository() {
      HttpSessionCsrfTokenRepository repository = new HttpSessionCsrfTokenRepository();
      repository.setHeaderName("X-XSRF-TOKEN");
      return repository;
    }
项目:trueyes    文件:WebfrontUIApplication.java   
private CsrfTokenRepository csrfTokenRepository() {
    HttpSessionCsrfTokenRepository repository = new HttpSessionCsrfTokenRepository();
    repository.setHeaderName("X-XSRF-TOKEN");
    return repository;
}
项目:restbucks-member    文件:WebSecurityConfiguration.java   
private CsrfTokenRepository csrfTokenRepository() {
    HttpSessionCsrfTokenRepository repository = new HttpSessionCsrfTokenRepository();
    repository.setHeaderName("X-XSRF-TOKEN");//for AngularJS's built-in CSRF feature
    return repository;
}
项目:eve-oauth2-example    文件:EveOAuth2Example.java   
private CsrfTokenRepository csrfTokenRepository()
{
  HttpSessionCsrfTokenRepository repository = new HttpSessionCsrfTokenRepository();
  repository.setHeaderName("X-XSRF-TOKEN");
  return repository;
}
项目:igsn30    文件:MultiHttpSecurityConfig.java   
private CsrfTokenRepository csrfTokenRepository() {
  HttpSessionCsrfTokenRepository repository = new HttpSessionCsrfTokenRepository();
  repository.setHeaderName("X-XSRF-TOKEN");
  return repository;
}
项目:spring-security-adfs-saml2    文件:SAMLWebSecurityConfigurerAdapter.java   
/**
 * Configure CSRF token repository to accept CSRF token from AngularJS friendly header.
 *
 * @return CsrfTokenRepository
 */
private CsrfTokenRepository csrfTokenRepository() {
    HttpSessionCsrfTokenRepository repository = new HttpSessionCsrfTokenRepository();
    repository.setHeaderName(CsrfHeaderFilter.HEADER_NAME);
    return repository;
}
项目:wonderjameeee    文件:SecurityConfiguration.java   
CsrfTokenRepository csrfTokenRepository() {
    HttpSessionCsrfTokenRepository repository = new HttpSessionCsrfTokenRepository();
    repository.setHeaderName(XXSRFTOKEN);
    return repository;
}
项目:harris-de-swarm    文件:UiApplication.java   
private CsrfTokenRepository csrfTokenRepository() {
    HttpSessionCsrfTokenRepository repository = new HttpSessionCsrfTokenRepository();
    repository.setHeaderName("X-XSRF-TOKEN");
    return repository;
}
项目:oauth-register-broker    文件:SecurityConfig.java   
private CsrfTokenRepository csrfTokenRepository() {
    HttpSessionCsrfTokenRepository repository = new HttpSessionCsrfTokenRepository();
    repository.setHeaderName("X-XSRF-TOKEN");
    return repository;
}
项目:abixen-platform    文件:PlatformSecurityConfiguration.java   
private CsrfTokenRepository csrfTokenRepository() {
    HttpSessionCsrfTokenRepository repository = new HttpSessionCsrfTokenRepository();
    repository.setHeaderName("X-XSRF-TOKEN");
    return repository;
}
项目:pollistics    文件:WebSecurityConfig.java   
private CsrfTokenRepository csrfTokenRepository()
{
    HttpSessionCsrfTokenRepository repository = new HttpSessionCsrfTokenRepository();
    repository.setSessionAttributeName("_csrf");
    return repository;
}
项目:mccy-engine    文件:SecurityConfig.java   
@Bean
public CsrfTokenRepository csrfTokenRepository() {
    HttpSessionCsrfTokenRepository repository = new HttpSessionCsrfTokenRepository();
    repository.setHeaderName(MccyConstants.X_XSRF_TOKEN);
    return repository;
}
项目:db-dumper-service    文件:SecurityConfig.java   
private CsrfTokenRepository csrfTokenRepository() {
    HttpSessionCsrfTokenRepository repository = new HttpSessionCsrfTokenRepository();
    repository.setHeaderName("X-XSRF-TOKEN");
    return repository;
}
项目:dick    文件:SsoSecurityAutoConfiguration.java   
private CsrfTokenRepository csrfTokenRepository() {
    HttpSessionCsrfTokenRepository repository = new HttpSessionCsrfTokenRepository();
    repository.setHeaderName("X-XSRF-TOKEN");
    return repository;
}
项目:dick    文件:BasicSecurityAutoConfiguration.java   
private CsrfTokenRepository csrfTokenRepository() {
    HttpSessionCsrfTokenRepository repository = new HttpSessionCsrfTokenRepository();
    repository.setHeaderName("X-XSRF-TOKEN");
    return repository;
}
项目:building-microservices    文件:SsoUiApplication.java   
private CsrfTokenRepository csrfTokenRepository() {
    HttpSessionCsrfTokenRepository repository = new HttpSessionCsrfTokenRepository();
    repository.setHeaderName("X-XSRF-TOKEN");
    return repository;
}
项目:spring-polymer-demo    文件:PolymerDemoSpringSessionConfig.java   
private CsrfTokenRepository csrfTokenRepository() {
    HttpSessionCsrfTokenRepository repository = new HttpSessionCsrfTokenRepository();
    repository.setHeaderName("X-XSRF-TOKEN");
    return repository;
}
项目:spring-polymer-demo    文件:PolymerDemoOAuthConfig.java   
private CsrfTokenRepository csrfTokenRepository() {
    HttpSessionCsrfTokenRepository repository = new HttpSessionCsrfTokenRepository();
    repository.setHeaderName("X-XSRF-TOKEN");
    return repository;
}
项目:spring-multi-module-oauth-sso    文件:AuthClientApplication.java   
private CsrfTokenRepository csrfTokenRepository() {
    HttpSessionCsrfTokenRepository repository = new HttpSessionCsrfTokenRepository();
    repository.setHeaderName("X-XSRF-TOKEN");
    return repository;
}
项目:spring-multi-module-oauth-sso    文件:AuthClientApplication.java   
private CsrfTokenRepository csrfTokenRepository() {
    HttpSessionCsrfTokenRepository repository = new HttpSessionCsrfTokenRepository();
    repository.setHeaderName("X-XSRF-TOKEN");
    return repository;
}
项目:gear-service    文件:SecurityConfiguration.java   
/**
 * Method csrfTokenRepository creates repository for csrf security token
 * @return repository for csrf security token
 */
private CsrfTokenRepository csrfTokenRepository() {
    HttpSessionCsrfTokenRepository repository = new HttpSessionCsrfTokenRepository();
    repository.setHeaderName("X-XSRF-TOKEN");
    return repository;
}
项目:IGSN    文件:SecurityConfig.java   
private CsrfTokenRepository csrfTokenRepository() {
  HttpSessionCsrfTokenRepository repository = new HttpSessionCsrfTokenRepository();
  repository.setHeaderName("X-XSRF-TOKEN");
  return repository;
}