2.5.0-beta1 • Published 8 years ago

node-sp-auth-config v2.5.0-beta1

Weekly downloads
6,583
License
MIT
Repository
github
Last release
8 years ago

node-sp-auth-config - Config options builder for node-sp-auth (SharePoint Authentication in Node.js)

NPM

npm version Downloads Gitter chat

node-sp-auth-config provides wizard-like approach for building and managing config files for node-sp-auth (Node.js to SharePoint unattended http authentication). Includes CLI for generating config files from command prompt.

Versions supported:

  • SharePoint 2013
  • SharePoint 2016
  • SharePoint Online

Authentication options:

  • SharePoint 2013, 2016:
    • Addin only permissions
    • User credentials through the http ntlm handshake
    • Form-based authentication (FBA)
    • Forefront TMG authentication
  • SharePoint Online:
    • Addin only permissions
    • SAML based with user credentials
    • ADFS user credentials (works with both SharePoint on-premise and Online)

How to use

Install

npm install node-sp-auth-config --save

or install globally to use as CLI:

npm install node-sp-auth-config -g

Usage as CLI

sp-auth init --path ./config/private.config.json
sp-auth --help # for help about parameters

Usage in TypeScript

import { AuthConfig } from 'node-sp-auth-config';

const authConfig = new AuthConfig({
  configPath: './config/private.json',
  encryptPassword: true,
  saveConfigOnDisk: true
});

authConfig.getContext()
  .then(context => {
    console.log(JSON.stringify(context, null, 2));
    // context.authOptions - node-sp-auth authentication options
  })
  .catch(error => {
    console.log(error);
  });

Usage in JavaScript

const AuthConfig = require('node-sp-auth-config').AuthConfig;

const authConfig = new AuthConfig({
  configPath: './config/private.json',
  encryptPassword: true,
  saveConfigOnDisk: true
});

authConfig.getContext()
  .then(context => {
    console.log(JSON.stringify(context, null, 2));
    // context.authOptions - node-sp-auth authentication options
  })
  .catch(error => {
    console.log(error);
  });

Initiation parameters

ParameterDefault valueDescription
configPath'./config/private.json'Path to auth config .json
encryptPasswordtrueEncrypt password to a machine-bind hash
saveConfigOnDisktrueSave config .json to disk
forcePromptsfalseForce parameters prompts
defaultConfigPathemptyPath to .json config, parameters from which are placed as defaults
authOptionsemptyAny valid node-sp-auth options
3.0.4

4 years ago

3.0.3

4 years ago

3.0.5

4 years ago

3.0.2

4 years ago

3.0.1

6 years ago

3.0.0

6 years ago

3.0.0-beta.0

6 years ago

2.9.4

6 years ago

2.9.3

6 years ago

2.9.2

6 years ago

2.9.1

6 years ago

2.9.0-beta.0

6 years ago

2.8.0

6 years ago

2.7.0

6 years ago

2.6.7

7 years ago

2.6.6

7 years ago

2.6.5

7 years ago

2.6.4

7 years ago

2.6.3

7 years ago

2.6.3-beta1

7 years ago

2.6.2

7 years ago

2.6.1

7 years ago

2.6.0

7 years ago

2.5.8

7 years ago

2.5.7

7 years ago

2.5.6

8 years ago

2.5.5

8 years ago

2.5.4

8 years ago

2.5.3

8 years ago

2.5.2

8 years ago

2.5.2-beta

8 years ago

2.5.0-beta1

8 years ago

2.0.0-beta1

8 years ago

2.4.5

8 years ago

2.4.4

8 years ago

2.4.3

8 years ago

2.4.2

8 years ago

2.4.1

8 years ago

2.3.1

8 years ago

2.3.0

8 years ago

2.2.0

8 years ago

2.1.1

8 years ago

2.1.0

8 years ago

2.0.11

8 years ago

2.0.10

8 years ago

2.0.9

8 years ago

2.0.8

8 years ago

2.0.7

8 years ago

2.0.6

8 years ago

2.0.5

9 years ago

2.0.4

9 years ago

2.0.3

9 years ago

2.0.2

9 years ago

2.0.1

9 years ago

2.0.0

9 years ago

1.1.1

9 years ago

1.1.0

9 years ago

1.0.10

9 years ago

1.0.9

9 years ago

1.0.8

9 years ago

1.0.7

9 years ago

1.0.6

9 years ago

1.0.5

9 years ago

1.0.4

9 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago