Implements authentications for REST APIs based on shiro security. It uses a token-based workflow.