class OadrSecurityRoleService {

	public User grantBasicRole(String username, CharSequence rawPassword) {
		AbstractUser abstractUser = saveFindUser(username);
		if (!encoder.matches(rawPassword, abstractUser.getBasicPassword())) {
			throw new BadCredentialsException("Bad credentials given for user: '" + username + "'");
		}
		return this.grantRole(abstractUser, abstractUser.getBasicPassword());
	}

}