Bug 20402: Implement OAuth2 authentication for REST API