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

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

    repository.setHeaderName("X-XSRF-TOKEN");
    return repository;
}
项目: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;
}
项目: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;
}
项目:tapestry-csrf-protection    文件:SpringCsrfTokenRepositoryTest.java   
private static SpringCsrfTokenRepository createSpringTokenRepo()
{
    HttpServletRequest request = createNiceMock(HttpServletRequest.class);
    HttpServletResponse response = createNiceMock(HttpServletResponse.class);
    CsrfTokenRepository springCsrfTokenRepository = createNiceMock(CsrfTokenRepository.class);
    expect(springCsrfTokenRepository.generateToken(EasyMock.anyObject(HttpServletRequest.class)))
        .andReturn(SPRING_TOKEN);
    expect(springCsrfTokenRepository.loadToken(EasyMock.anyObject(HttpServletRequest.class)))
        .andReturn(SPRING_TOKEN);
    replay(request, response, springCsrfTokenRepository);
    SpringCsrfTokenRepository csrfTokenRepository =
        new SpringCsrfTokenRepository(springCsrfTokenRepository, request, response);
    return csrfTokenRepository;
}
项目: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    文件:SecurityRestServiceImpl.java   
/**
 * @param csrfTokenRepository the csrfTokenRepository to set
 */
@Inject
public void setCsrfTokenRepository(CsrfTokenRepository csrfTokenRepository) {

  this.csrfTokenRepository = csrfTokenRepository;
}
项目: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;
}