List of usage examples for org.apache.shiro.authc.credential PasswordMatcher getPasswordService
public PasswordService getPasswordService()
From source file:waffle.shiro.AbstractWaffleRealm.java
License:Open Source License
/** * Gets the hash service.// ww w .j av a 2s . c o m * * @return the hash service */ private HashingPasswordService getHashService() { final CredentialsMatcher matcher = this.getCredentialsMatcher(); if (matcher instanceof PasswordMatcher) { final PasswordMatcher passwordMatcher = (PasswordMatcher) matcher; final PasswordService passwordService = passwordMatcher.getPasswordService(); if (passwordService instanceof HashingPasswordService) { return (HashingPasswordService) passwordService; } } return null; }