chore: get everything up 2 date

This commit is contained in:
simon
2020-05-14 15:02:15 +02:00
parent 174f8b6fc1
commit 842b93634e
24 changed files with 1477 additions and 1016 deletions

View File

@@ -1,17 +1,16 @@
import 'mocha';
import { expect } from 'chai';
import * as fs from 'fs';
import { GoogleLDAPAuth } from '../../src/auth/GoogleLDAPAuth';
describe('test google ldap auth', function() {
describe('test google ldap auth', function () {
this.timeout(10000);
it('authenticate against ldap server', async () => {
const auth = new GoogleLDAPAuth({
base: 'dc=hokify,dc=com',
tlsOptions: {
key: fs.readFileSync('./ldap.gsuite.key'),
cert: fs.readFileSync('./ldap.gsuite.crt')
}
tls: {
keyFile: './ldap.gsuite.key',
certFile: './ldap.gsuite.crt',
},
});
const result = await auth.authenticate('username', 'password');

View File

@@ -8,7 +8,7 @@ describe('test imap auth', () => {
host: 'imap.gmail.com',
port: 993,
useSecureTransport: true,
validHosts: ['gmail.com']
validHosts: ['gmail.com'],
});
const result = await auth.authenticate('username', 'password');

View File

@@ -1,19 +1,20 @@
import 'mocha';
import { expect } from 'chai';
import * as fs from 'fs';
import { LDAPAuth } from '../../src/auth/LDAPAuth';
describe('test ldap auth', function() {
describe('test ldap auth', function () {
this.timeout(10000);
it('authenticate against ldap server', async () => {
const auth = new LDAPAuth({
url: 'ldaps://ldap.google.com:636',
base: 'dc=hokify,dc=com',
tls: {
keyFile: './ldap.gsuite.key',
certFile: './ldap.gsuite.crt',
},
tlsOptions: {
servername: 'ldap.google.com',
key: fs.readFileSync('./ldap.gsuite.key'),
cert: fs.readFileSync('./ldap.gsuite.crt')
}
},
});
const result = await auth.authenticate('username', 'password');

View File

@@ -8,7 +8,7 @@ describe('test smtp auth', () => {
host: 'smtp.gmail.com',
port: 465,
useSecureTransport: true,
validHosts: ['gmail.com']
validHosts: ['gmail.com'],
});
const result = await auth.authenticate('username', 'password');