![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
node-sp-auth-config
Advanced tools
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 a command prompt.
Versions supported:
Authentication options:
Config layer and auth support Office 365 Dedicated (SPO on a custom domain) as well.
npm install node-sp-auth-config --save
or install globally to use as CLI:
npm install node-sp-auth-config -g
sp-auth init --path ./config/private.config.json
sp-auth --help # for help about parameters
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(console.warn);
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(console.warn);
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 |
headlessMode | false | Prevents interactive prompts - for headless, CI/CD processes |
defaultConfigPath | empty | Path to .json config, parameters from which are placed as defaults |
authOptions | empty | Any valid node-sp-auth options |
When using in a headless mode, in case of missing parameters, one can expect non-interactive behavior with no prompts but graceful exit with corresponding error output.
This can be achieved by providing headlessMode
settings property is equal to true
.
The headless mode also automatically configured when NODE_ENV
(or SPAUTH_ENV
) environment variable is equal to production
.
All the parameters which are usually stored in private.json
can be defined also using environment variables. Environment variables started with SPAUTH_
prefix are recognized with the library. The second part of the name is an actual name of the node-sp-auth
credentials property yet in uppercase (e.g. SPAUTH_SITEURL
, SPAUTH_USERNAME
, SPAUTH_PASSWORD
).
Along with credentials props these service variables are used:
Variable | Description |
---|---|
NODE_ENV | When equal to production forces headlessMode . |
SPAUTH_ENV | When equal to production forces headlessMode . Overwrites NODE_ENV . |
SPAUTH_FORCE | Makes SPAUTH_{CREDENTIALS} variables take precedence over those possibly stored in private.json . |
Checkout this end-to-end sample.
FAQs
Config options builder for node-sp-auth (SharePoint Authentication in Node.js)
The npm package node-sp-auth-config receives a total of 0 weekly downloads. As such, node-sp-auth-config popularity was classified as not popular.
We found that node-sp-auth-config demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.