Support both maps and Spring Security tokens