本文整理匯總了Java中org.springframework.security.web.csrf.HttpSessionCsrfTokenRepository.setHeaderName方法的典型用法代碼示例。如果您正苦於以下問題:Java HttpSessionCsrfTokenRepository.setHeaderName方法的具體用法?Java HttpSessionCsrfTokenRepository.setHeaderName怎麽用?Java HttpSessionCsrfTokenRepository.setHeaderName使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.springframework.security.web.csrf.HttpSessionCsrfTokenRepository
的用法示例。
在下文中一共展示了HttpSessionCsrfTokenRepository.setHeaderName方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: csrfTokenRepository
import org.springframework.security.web.csrf.HttpSessionCsrfTokenRepository; //導入方法依賴的package包/類
@Bean
public CsrfTokenRepository csrfTokenRepository() {
HttpSessionCsrfTokenRepository repository =
new HttpSessionCsrfTokenRepository();
repository.setHeaderName("X-XSRF-TOKEN");
return repository;
}
示例2: csrfTokenRepository
import org.springframework.security.web.csrf.HttpSessionCsrfTokenRepository; //導入方法依賴的package包/類
/**
* define csrf header entry.
*
* @return csrf header entry
*/
@Bean
public CsrfTokenRepository csrfTokenRepository() {
final HttpSessionCsrfTokenRepository repository = new HttpSessionCsrfTokenRepository();
repository.setHeaderName(ResourcePaths.XSRF_HEADER);
return repository;
}
示例3: csrfTokenRepository
import org.springframework.security.web.csrf.HttpSessionCsrfTokenRepository; //導入方法依賴的package包/類
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;
}
示例4: csrfTokenRepository
import org.springframework.security.web.csrf.HttpSessionCsrfTokenRepository; //導入方法依賴的package包/類
@Bean
protected CsrfTokenRepository csrfTokenRepository()
{
HttpSessionCsrfTokenRepository repository = new HttpSessionCsrfTokenRepository();
repository.setHeaderName( "X-XSRF-TOKEN" );
return repository;
}
示例5: csrfTokenRepository
import org.springframework.security.web.csrf.HttpSessionCsrfTokenRepository; //導入方法依賴的package包/類
private CsrfTokenRepository csrfTokenRepository() {
HttpSessionCsrfTokenRepository repository = new HttpSessionCsrfTokenRepository();
repository.setHeaderName("X-XSRF-TOKEN");
return repository;
}
示例6: csrfTokenRepository
import org.springframework.security.web.csrf.HttpSessionCsrfTokenRepository; //導入方法依賴的package包/類
private CsrfTokenRepository csrfTokenRepository() {
HttpSessionCsrfTokenRepository repository = new HttpSessionCsrfTokenRepository();
repository.setHeaderName("X-XSRF-TOKEN");
return repository;
}
示例7: csrfTokenRepository
import org.springframework.security.web.csrf.HttpSessionCsrfTokenRepository; //導入方法依賴的package包/類
private CsrfTokenRepository csrfTokenRepository() {
HttpSessionCsrfTokenRepository repository = new HttpSessionCsrfTokenRepository();
log.info(Json.toJson(repository));
repository.setHeaderName(CSRF_HEADER_NAME);
return repository;
}
示例8: csrfTokenRepository
import org.springframework.security.web.csrf.HttpSessionCsrfTokenRepository; //導入方法依賴的package包/類
private CsrfTokenRepository csrfTokenRepository()
{
HttpSessionCsrfTokenRepository repository = new HttpSessionCsrfTokenRepository();
repository.setHeaderName("X-XSRF-TOKEN");
return repository;
}
示例9: csrfTokenRepository
import org.springframework.security.web.csrf.HttpSessionCsrfTokenRepository; //導入方法依賴的package包/類
@Bean
public CsrfTokenRepository csrfTokenRepository() {
final HttpSessionCsrfTokenRepository repository = new HttpSessionCsrfTokenRepository();
repository.setHeaderName(CsrfCookieGeneratorFilter.ANGULAR_CSRF_DEFAULT_HEADER_NAME);
return repository;
}
示例10: csrfTokenRepository
import org.springframework.security.web.csrf.HttpSessionCsrfTokenRepository; //導入方法依賴的package包/類
@SuppressWarnings("unused")
private CsrfTokenRepository csrfTokenRepository() {
HttpSessionCsrfTokenRepository repository = new HttpSessionCsrfTokenRepository();
repository.setHeaderName("X-XSRF-TOKEN");
return repository;
}
示例11: csrfTokenRepository
import org.springframework.security.web.csrf.HttpSessionCsrfTokenRepository; //導入方法依賴的package包/類
private CsrfTokenRepository csrfTokenRepository() {
HttpSessionCsrfTokenRepository repository = new HttpSessionCsrfTokenRepository();
repository.setHeaderName("X-XSRF-TOKEN");//for AngularJS's built-in CSRF feature
return repository;
}
示例12: csrfTokenRepository
import org.springframework.security.web.csrf.HttpSessionCsrfTokenRepository; //導入方法依賴的package包/類
private CsrfTokenRepository csrfTokenRepository() {
HttpSessionCsrfTokenRepository repository = new HttpSessionCsrfTokenRepository();
repository.setHeaderName("X-XSRF-TOKEN");
return repository;
}
示例13: csrfTokenRepository
import org.springframework.security.web.csrf.HttpSessionCsrfTokenRepository; //導入方法依賴的package包/類
/**
* 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;
}
開發者ID:choonchernlim,項目名稱:spring-security-adfs-saml2,代碼行數:11,代碼來源:SAMLWebSecurityConfigurerAdapter.java
示例14: csrfTokenRepository
import org.springframework.security.web.csrf.HttpSessionCsrfTokenRepository; //導入方法依賴的package包/類
CsrfTokenRepository csrfTokenRepository() {
HttpSessionCsrfTokenRepository repository = new HttpSessionCsrfTokenRepository();
repository.setHeaderName(XXSRFTOKEN);
return repository;
}
示例15: csrfTokenRepository
import org.springframework.security.web.csrf.HttpSessionCsrfTokenRepository; //導入方法依賴的package包/類
@Bean
public CsrfTokenRepository csrfTokenRepository() {
HttpSessionCsrfTokenRepository repository = new HttpSessionCsrfTokenRepository();
repository.setHeaderName(MccyConstants.X_XSRF_TOKEN);
return repository;
}