Java Code Examples for org.apache.shiro.cache.CacheManager#getCache()

The following examples show how to use org.apache.shiro.cache.CacheManager#getCache() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: GenericOAuth2ApiBinding.java    From super-cloudops with Apache License 2.0 5 votes vote down vote up
public GenericOAuth2ApiBinding(C config, RestTemplate restTemplate, CacheManager cacheManager) {
	notNull(config, "'config' is null, please check the configure");
	notNull(restTemplate, "'restTemplate' is null, please check the configure");
	notNull(cacheManager, "'cacheManager' is null, please check the configure");
	this.config = config;
	this.restTemplate = restTemplate;
	Object cacheObject = cacheManager.getCache(DEFAULT_CACHE_NAME);
	notNull(cacheObject, "'cacheObject' is null, please check the configure");
	isInstanceOf(IamCache.class, cacheObject);
	this.cache = (IamCache) cacheObject;
}
 
Example 2
Source File: RetryLimitHashedCredentialsMatcher.java    From SpringBoot-Base-System with GNU Lesser General Public License v3.0 5 votes vote down vote up
public RetryLimitHashedCredentialsMatcher(CacheManager cacheManager) {
	setHashAlgorithmName("MD5");
	setHashIterations(1);
	setStoredCredentialsHexEncoded(true);
	log.info("初始化获取一个密码passwordRetryCache缓存");
	passwordRetryCache = cacheManager.getCache("passwordRetryCache");
}
 
Example 3
Source File: RetryLimitHashedCredentialsMatcher.java    From songjhh_blog with Apache License 2.0 4 votes vote down vote up
public RetryLimitHashedCredentialsMatcher(CacheManager cacheManager) {
    passwordRetryCache = cacheManager.getCache("passwordRetryCache");
}
 
Example 4
Source File: RetryLimitHashedCredentialsMatcher.java    From EasyReport with Apache License 2.0 4 votes vote down vote up
public RetryLimitHashedCredentialsMatcher(CacheManager cacheManager) {
    passwordRetryCache = cacheManager.getCache("passwordRetryCache");
}
 
Example 5
Source File: KickoutSessionControlFilter.java    From MultimediaDesktop with Apache License 2.0 4 votes vote down vote up
public void setCacheManager(CacheManager cacheManager) {
	this.cache = cacheManager.getCache("shiro-kickout-session");
}
 
Example 6
Source File: RetryLimitHashedCredentialsMatcher.java    From VideoMeeting with Apache License 2.0 4 votes vote down vote up
public RetryLimitHashedCredentialsMatcher(CacheManager cacheManager) {
	passwordRetryCache = cacheManager.getCache("passwordRetryCache");
}
 
Example 7
Source File: RetryLimitMd5CredentialsMatcher.java    From java-platform with Apache License 2.0 4 votes vote down vote up
public RetryLimitMd5CredentialsMatcher(CacheManager cacheManager, Integer maxRetryCount) {
	passwordRetryCache = cacheManager.getCache("password_retry");
	this.maxRetryCount = maxRetryCount;
	setHashAlgorithmName(Md5Hash.ALGORITHM_NAME);
}
 
Example 8
Source File: RetryLimitHashedCredentialsMatcher.java    From spring-tutorial with Creative Commons Attribution Share Alike 4.0 International 4 votes vote down vote up
public RetryLimitHashedCredentialsMatcher(CacheManager cacheManager) {
	passwordRetryCache = cacheManager.getCache("passwordRetryCache");
}
 
Example 9
Source File: RetryLimitMatcher.java    From utils with Apache License 2.0 4 votes vote down vote up
public RetryLimitMatcher(CacheManager cacheManager) {
    passwordRetryCache = cacheManager.getCache("passwordRetryCache");
    maxRetry = 5;
}
 
Example 10
Source File: RetryLimitHashedCredentialsMatcher.java    From roncoo-pay with Apache License 2.0 4 votes vote down vote up
public RetryLimitHashedCredentialsMatcher(CacheManager cacheManager) {
	passwordRetryCache = cacheManager.getCache("passwordRetryCache");
}
 
Example 11
Source File: EhcacheRetryLimitHashedCredentialsMatcher.java    From cms with Apache License 2.0 4 votes vote down vote up
public EhcacheRetryLimitHashedCredentialsMatcher(CacheManager cacheManager) {
    passwordRetryCache = cacheManager.getCache(cacheKeyName);
}
 
Example 12
Source File: RetryLimitHashedCredentialsMatcher.java    From spring-boot-shiro with Apache License 2.0 4 votes vote down vote up
public RetryLimitHashedCredentialsMatcher(CacheManager cacheManager) {
    passwordRetryCache = cacheManager.getCache("passwordRetryCache");
}
 
Example 13
Source File: LogoutFilter.java    From supplierShop with MIT License 4 votes vote down vote up
public void setCacheManager(CacheManager cacheManager)
{
    // 必须和ehcache缓存配置中的缓存name一致
    this.cache = cacheManager.getCache(ShiroConstants.SYS_USERCACHE);
}
 
Example 14
Source File: kickoutSessionControlFilter.java    From songjhh_blog with Apache License 2.0 4 votes vote down vote up
public void setCacheManager(CacheManager cacheManager) {
    this.cache = cacheManager.getCache("shiro-kickout-session");
}
 
Example 15
Source File: KickoutSessionFilter.java    From RuoYi with Apache License 2.0 4 votes vote down vote up
/**
 * 设置Cache的key的前缀
 */
public void setCacheManager(CacheManager cacheManager) {
    // 必须和ehcache缓存配置中的缓存name一致
    this.cache = cacheManager.getCache(ShiroConstants.SYS_USERCACHE);
}
 
Example 16
Source File: LogoutFilter.java    From RuoYi with Apache License 2.0 4 votes vote down vote up
/**
 * 设置Cache的key的前缀
 * @param cacheManager 缓存管理器
 */
public void setCacheManager(CacheManager cacheManager) {
    // 必须和ehcache缓存配置中的缓存name一致
    this.cache = cacheManager.getCache(ShiroConstants.SYS_USERCACHE);
}
 
Example 17
Source File: SysAccessControllerFilter.java    From taoshop with Apache License 2.0 4 votes vote down vote up
public void setCacheManager(CacheManager cacheManager){
    this.cache = cacheManager.getCache("");
}
 
Example 18
Source File: KickoutSessionFilter.java    From supplierShop with MIT License 4 votes vote down vote up
public void setCacheManager(CacheManager cacheManager)
{
    // 必须和ehcache缓存配置中的缓存name一致
    this.cache = cacheManager.getCache(ShiroConstants.SYS_USERCACHE);
}
 
Example 19
Source File: CustomLogoutFilter.java    From v-mock with MIT License 2 votes vote down vote up
/**
 * 设置Cache的key的前缀
 *
 * @param cacheManager 缓存管理器
 */
public void setCacheManager(CacheManager cacheManager) {
    // 必须和ehcache缓存配置中的缓存name一致
    this.cache = cacheManager.getCache(LoginConst.SYS_USER_CACHE);
}