Methods
exports(API_Config, Local_Config) → {Middleware}
Parameters:
Name | Type | Description |
---|---|---|
API_Config |
APIConfig | |
Local_Config |
LocalConfig |
Returns:
- Type
- Middleware
Type Definitions
APIConfig
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
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
setSession |
SessionHandler | |||
getSession |
SessionHandler | |||
successURL |
string |
<optional> |
""
|
URL to redirect when OAuth succeed |
Local configuration
Type:
- object
Middleware
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)
Session handler
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
request |
Express~Request | ||
response |
Express~Response | ||
data |
SessionData |
<optional> |