|
|
@ -99,6 +99,21 @@ interface IGoogleLDAPAuthOptions {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
```
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Example
|
|
|
|
|
|
|
|
```js
|
|
|
|
|
|
|
|
c = {
|
|
|
|
|
|
|
|
// GoogleLDAPAuth (optimized for google auth)
|
|
|
|
|
|
|
|
authentication: 'GoogleLDAPAuth',
|
|
|
|
|
|
|
|
authenticationOptions: {
|
|
|
|
|
|
|
|
base: 'dc=hokify,dc=com',
|
|
|
|
|
|
|
|
tlsOptions: {
|
|
|
|
|
|
|
|
key: fs.readFileSync('ldap.gsuite.hokify.com.40567.key'),
|
|
|
|
|
|
|
|
cert: fs.readFileSync('ldap.gsuite.hokify.com.40567.crt')
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
#### LDAP
|
|
|
|
#### LDAP
|
|
|
|
|
|
|
|
|
|
|
|
ldap authentication
|
|
|
|
ldap authentication
|
|
|
@ -126,6 +141,22 @@ interface ILDAPAuthOptions {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
```
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Example
|
|
|
|
|
|
|
|
```js
|
|
|
|
|
|
|
|
c = {
|
|
|
|
|
|
|
|
authentication: 'LDAPAuth',
|
|
|
|
|
|
|
|
authenticationOptions: {
|
|
|
|
|
|
|
|
url: 'ldaps://ldap.google.com',
|
|
|
|
|
|
|
|
base: 'dc=hokify,dc=com',
|
|
|
|
|
|
|
|
tlsOptions: {
|
|
|
|
|
|
|
|
key: fs.readFileSync('ldap.gsuite.hokify.com.40567.key'),
|
|
|
|
|
|
|
|
cert: fs.readFileSync('ldap.gsuite.hokify.com.40567.crt'),
|
|
|
|
|
|
|
|
servername: 'ldap.google.com'
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
#### IMAP
|
|
|
|
#### IMAP
|
|
|
|
|
|
|
|
|
|
|
|
imap authenticiation
|
|
|
|
imap authenticiation
|
|
|
@ -139,6 +170,19 @@ interface IIMAPAuthOptions {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
```
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Example
|
|
|
|
|
|
|
|
```js
|
|
|
|
|
|
|
|
c = {
|
|
|
|
|
|
|
|
authentication: 'IMAPAuth',
|
|
|
|
|
|
|
|
authenticationOptions: {
|
|
|
|
|
|
|
|
host: 'imap.gmail.com',
|
|
|
|
|
|
|
|
port: 993,
|
|
|
|
|
|
|
|
useSecureTransport: true,
|
|
|
|
|
|
|
|
validHosts: ['hokify.com']
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
#### SMTP
|
|
|
|
#### SMTP
|
|
|
|
|
|
|
|
|
|
|
|
smtp authenticiation
|
|
|
|
smtp authenticiation
|
|
|
@ -152,6 +196,19 @@ interface ISMTPAuthOptions {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
```
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Example
|
|
|
|
|
|
|
|
```js
|
|
|
|
|
|
|
|
c = {
|
|
|
|
|
|
|
|
authentication: 'IMAPAuth',
|
|
|
|
|
|
|
|
authenticationOptions: {
|
|
|
|
|
|
|
|
host: 'smtp.gmail.com',
|
|
|
|
|
|
|
|
port: 465,
|
|
|
|
|
|
|
|
useSecureTransport: true,
|
|
|
|
|
|
|
|
validHosts: ['gmail.com']
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
#### Static Auth
|
|
|
|
#### Static Auth
|
|
|
|
|
|
|
|
|
|
|
|
static authenticiation
|
|
|
|
static authenticiation
|
|
|
@ -165,8 +222,22 @@ interface IStaticAuthOtions {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
```
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Example
|
|
|
|
|
|
|
|
```js
|
|
|
|
|
|
|
|
c = {
|
|
|
|
|
|
|
|
authentication: 'StaticAuth',
|
|
|
|
|
|
|
|
authenticationOptions: {
|
|
|
|
|
|
|
|
validCredentials: [
|
|
|
|
|
|
|
|
{ username: 'test', password: 'pwd' },
|
|
|
|
|
|
|
|
{ username: 'user1', password: 'password' },
|
|
|
|
|
|
|
|
{ username: 'admin', password: 'cool' }
|
|
|
|
|
|
|
|
]
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
## Usage
|
|
|
|
|
|
|
|
|
|
|
|
Ensure you have installed latest node version and run:
|
|
|
|
Ensure you have installed latest nightly node version and run:
|
|
|
|
|
|
|
|
|
|
|
|
npm run start
|
|
|
|
npm run start
|
|
|
|