@quarks/quarks-iam
Version:
A modern authorization server built to authenticate your users and protect your APIs
32 lines (30 loc) • 708 B
JavaScript
/**
* Active Directory provider template
*/
module.exports = function (config, templateConfig) {
return {
id: 'ActiveDirectory',
serverType: 'AD',
protocol: 'LDAP',
fields: [
{ name: 'username', placeholder: 'User@domain' },
{ name: 'password', type: 'password' }
],
mapping: {
id: 'objectGUID',
email: 'userPrincipalName',
name: 'name',
givenName: 'givenName',
familyName: 'sn',
phoneNumber: function (info) {
return info.telephoneNumber ||
info.mobile ||
info.homePhone ||
info.otherHomePhone ||
info.otherTelephone ||
info.ipPhone ||
info.otherIpPhone
}
}
}
}