refactor by using constants and configuration attributes in pac4j core