Global

Methods

exports(API_Config, Local_Config) → {Middleware}

Source:
Parameters:
Name Type Description
API_Config APIConfig
Local_Config LocalConfig
Returns:
Type
Middleware

Type Definitions

APIConfig

Source:
Properties:
Name Type Attributes Description
AppID string
AppSecret string
AppScope Array.<string> <optional>
HookSecret string <optional>

Secret code of a Web hook

API configuration

Type:
  • object

LocalConfig

Source:
Properties:
Name Type Attributes Default Description
setSession SessionHandler
getSession SessionHandler
successURL string <optional>
""

URL to redirect when OAuth succeed

Local configuration

Type:
  • object

Middleware

Source:
Properties:
Name Type Description
router Express.Router
emitter external:EventEmitter

Middleware instance

Type:
  • object

SessionData

Source:
See:
Properties:
Name Type Description
AccessToken string

Access token of OAuth 2.0

Session data

Type:
  • object

SessionHandler(request, response, dataopt)

Source:

Session handler

Parameters:
Name Type Attributes Description
request Express~Request
response Express~Response
data SessionData <optional>