node-sp-auth-config v2.5.0-beta1
node-sp-auth-config - Config options builder for node-sp-auth (SharePoint Authentication in Node.js)
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 --saveor install globally to use as CLI:
npm install node-sp-auth-config -gUsage as CLI
sp-auth init --path ./config/private.config.json
sp-auth --help # for help about parametersUsage 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
| Parameter | Default value | Description |
|---|---|---|
| configPath | './config/private.json' | Path to auth config .json |
| encryptPassword | true | Encrypt password to a machine-bind hash |
| saveConfigOnDisk | true | Save config .json to disk |
| forcePrompts | false | Force parameters prompts |
| defaultConfigPath | empty | Path to .json config, parameters from which are placed as defaults |
| authOptions | empty | Any valid node-sp-auth options |
4 years ago
4 years ago
4 years ago
4 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago

