Class: shimrequest = new ShimRequest()

Shimmed Request to satisfy express requirements of passport strategies.

Properties
Name Type Description
headers Object

Shimmed Request to satisfy express requirements of passport strategies.

method string

Shimmed Request to satisfy express requirements of passport strategies.

path string

Shimmed Request to satisfy express requirements of passport strategies.

query Object

Shimmed Request to satisfy express requirements of passport strategies.

url string

Shimmed Request to satisfy express requirements of passport strategies.

constructor(request: ParsedRequest) : ShimRequest

Shimmed Request to satisfy express requirements of passport strategies.

Arguments
Name Type Description
request ParsedRequest

Shimmed Request to satisfy express requirements of passport strategies.

Class: strategyadapter = new StrategyAdapter()

Adapter class to invoke passport-strategy

  1. provides express dependencies to the passport strategies
  2. provides shimming of requests for passport authentication
  3. provides lifecycle similar to express to the passport-strategy
  4. provides state methods to the strategy instance see: https://github.com/jaredhanson/passport

constructor(strategy: Strategy) : StrategyAdapter

Arguments
Name Type Description
strategy Strategy

instance of a class which implements a passport-strategy;

authenticate(req: ParsedRequest) : Promise

The function to invoke the contained passport strategy.

1. Create an instance of the strategy
2. add success and failure state handlers
3. authenticate using the strategy

Arguments
Name Type Description
req ParsedRequest

The incoming request.