chore: get everything up 2 date
This commit is contained in:
@@ -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');
|
||||
|
||||
@@ -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');
|
||||
|
||||
@@ -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');
|
||||
|
||||
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user