You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Garrett Mills 78c57d7747
Initial CoreID changes to allow code-based integration
3 years ago
..
GoogleLDAPAuth.ts Initial CoreID changes to allow code-based integration 3 years ago
HTTPAuth.ts Initial CoreID changes to allow code-based integration 3 years ago
IMAPAuth.ts Initial CoreID changes to allow code-based integration 3 years ago
LDAPAuth.ts Initial CoreID changes to allow code-based integration 3 years ago
README.md docs: improve readme files 3 years ago
SMTPAuth.ts Initial CoreID changes to allow code-based integration 3 years ago
StaticAuth.ts chore: get everything up 2 date 4 years ago

README.md

Authentications

Google LDAP

google ldap optimized authenticiation implementaiton

interface IGoogleLDAPAuthOptions {
    /** base DN
     *  e.g. 'dc=hokify,dc=com', */
    base: string;
    tls: {
        keyFile: string;
        certFile: string;
    };
    /** tls options
     * e.g. {
            key: fs.readFileSync('ldap.gsuite.key'),
            cert: fs.readFileSync('ldap.gsuite.crt')
        } */
    tlsOptions?: tls.TlsOptions;
  }

Example

c = {
	// GoogleLDAPAuth (optimized for google auth)
	authentication: 'GoogleLDAPAuth',
	authenticationOptions: {
		base: 'dc=hokify,dc=com',
		tls: {
            keyFile: 'ldap.gsuite.key',
            certFile: 'ldap.gsuite.crt'
        }
	}
};

LDAP

ldap authentication

interface ILDAPAuthOptions {
	/** ldap url
	 * e.g. ldaps://ldap.google.com
	 */
	url: string;
	/** base DN
	 *  e.g. 'dc=hokify,dc=com', */
	base: string;

	tls: {
		keyFile: string;
		certFile: string;
	};
	/** tls options
	 * e.g. {
			servername: 'ldap.google.com'
		} */
	tlsOptions?: any;
	/**
	 * searchFilter
	 */
	searchFilter?: string;
}

Example

c = {
	authentication: 'LDAPAuth',
	authenticationOptions: {
		url: 'ldaps://ldap.google.com',
		base: 'dc=hokify,dc=com',
        tlsOptions: {
            servername: 'ldap.google.com'
        },
        tls: {
            keyFile: 'ldap.gsuite.key',
            certFile: 'ldap.gsuite.crt'
        }
	}
};

IMAP

imap authenticiation

interface IIMAPAuthOptions {
	host: string;
	port?: number;
	useSecureTransport?: boolean;
	validHosts?: string[];
}

Example

c = {
	authentication: 'IMAPAuth',
	authenticationOptions: {
		host: 'imap.gmail.com',
		port: 993,
		useSecureTransport: true,
		validHosts: ['hokify.com']
	}
};

SMTP

smtp authenticiation

interface ISMTPAuthOptions {
	host: string;
	port?: number;
	useSecureTransport?: boolean;
	validHosts?: string[];
}

Example

c = {
	authentication: 'IMAPAuth',
	authenticationOptions: {
		host: 'smtp.gmail.com',
		port: 465,
		useSecureTransport: true,
		validHosts: ['gmail.com']
	}
};

Static Auth

static authenticiation

interface IStaticAuthOtions {
	validCrentials: {
		username: string;
		password: string;
	}[];
}

Example

c = {
	authentication: 'StaticAuth',
	authenticationOptions: {
		validCredentials: [
			{ username: 'test', password: 'pwd' },
			{ username: 'user1', password: 'password' },
			{ username: 'admin', password: 'cool' }
		]
	}
};

HTTP Post Auth

http authenticiation via http post request

interface IStaticAuthOtions {
	url: string; // url to send a post request with username and password 
}

Example

c = {
	authentication: 'HTTPAuth',
	authenticationOptions: {
		url: 'https://my-website.com/api/backend-login'
	}
};