reharik/papers

View on GitHub
src/authenticationMiddleware.js

Summary

Maintainability
A
2 hrs
Test Coverage

Function iterateStrategies has 35 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    co(function *iterateStrategies() {

      const checkSession = yield checkSessionForAuth(papers, req);
      if(checkSession.isLoggedIn) {
        return {type:'session'};
Severity: Minor
Found in src/authenticationMiddleware.js - About 1 hr to fix

    Avoid too many return statements within this function.
    Open

          return handleFailurePostIteration(failures, res, papers);
    Severity: Major
    Found in src/authenticationMiddleware.js - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

                return res.end(http.STATUS_CODES[res.statusCode]);
      Severity: Major
      Found in src/authenticationMiddleware.js - About 30 mins to fix

        There are no issues that match your filters.

        Category
        Status