Skip to content
This repository was archived by the owner on Feb 25, 2019. It is now read-only.

Add provider templating for boot-time inheritance #104

Merged
merged 1 commit into from
Jun 30, 2015
Merged

Add provider templating for boot-time inheritance #104

merged 1 commit into from
Jun 30, 2015

Conversation

adalinesimonian
Copy link
Member

Allows provider templates to be created, which define properties which can then
be inherited by multiple providers.

Template:

module.exports = function(config, templateConfig) {
  return {
    id: 'ActiveDirectory',
    protocol: 'ActiveDirectory',
    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;
      }
    }
  };
};

Inheriting provider:

module.exports = function(config) {
  return {
    id: 'mycorpad',
    name: 'Umbrella Corp',
    templates: [ 'ActiveDirectory' ]
  };
};

Allows provider templates to be created, which define properties which can then
be inherited by multiple providers.
christiansmith added a commit that referenced this pull request Jun 30, 2015
Add provider templating for boot-time inheritance
@christiansmith christiansmith merged commit 265c5b1 into anvilresearch:master Jun 30, 2015
@adalinesimonian adalinesimonian deleted the providertemplates branch June 30, 2015 06:10
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants