Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

node-sp-auth

Package Overview
Dependencies
Maintainers
1
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-sp-auth - npm Package Compare versions

Comparing version 1.2.3 to 1.3.0

lib/src/auth/resolvers/OnpremiseFbaCredentials.d.ts

4

lib/src/auth/AuthResolverFactory.js
"use strict";
var OnpremiseFbaCredentials_1 = require('./resolvers/OnpremiseFbaCredentials');
var OnpremiseUserCredentials_1 = require('./resolvers/OnpremiseUserCredentials');

@@ -12,2 +13,5 @@ var OnlineUserCredentials_1 = require('./resolvers/OnlineUserCredentials');

AuthResolverFactory.resolve = function (siteUrl, options) {
if (authOptions.isFbaCredentialsOnpremise(siteUrl, options)) {
return new OnpremiseFbaCredentials_1.OnpremiseFbaCredentials(siteUrl, options);
}
if (authOptions.isUserCredentialsOnpremise(siteUrl, options)) {

@@ -14,0 +18,0 @@ return new OnpremiseUserCredentials_1.OnpremiseUserCredentials(siteUrl, options);

@@ -18,2 +18,5 @@ export interface IBasicOAuthOption {

}
export interface IOnpremiseFbaCredentials extends IUserCredentials {
fba: boolean;
}
export interface IOnpremiseUserCredentials extends IUserCredentials {

@@ -34,2 +37,3 @@ domain?: string;

export declare function isUserCredentialsOnpremise(siteUrl: string, T: IAuthOptions): T is IOnpremiseUserCredentials;
export declare function isFbaCredentialsOnpremise(siteUrl: string, T: IAuthOptions): T is IOnpremiseFbaCredentials;
export declare function isAdfsCredentials(T: IAuthOptions): T is IAdfsUserCredentials;

@@ -29,2 +29,11 @@ "use strict";

exports.isUserCredentialsOnpremise = isUserCredentialsOnpremise;
function isFbaCredentialsOnpremise(siteUrl, T) {
var host = (url.parse(siteUrl)).host;
var isOnPrem = host.indexOf('.sharepoint.com') === -1 && host.indexOf('.sharepoint.cn') === -1;
if (isOnPrem && T.username !== undefined && T.fba) {
return true;
}
return false;
}
exports.isFbaCredentialsOnpremise = isFbaCredentialsOnpremise;
function isAdfsCredentials(T) {

@@ -31,0 +40,0 @@ return T.adfsUrl !== undefined;

export declare const SharePointServicePrincipal: string;
export declare const HighTrustTokenLifeTime: number;
export declare const MSOnlineSts: string;
export declare const FbaAuthEndpoint: string;
export declare const FormsPath: string;

@@ -5,0 +6,0 @@ export declare const RtFa: string;

@@ -5,2 +5,3 @@ "use strict";

exports.MSOnlineSts = 'https://login.microsoftonline.com/extSTS.srf';
exports.FbaAuthEndpoint = '_vti_bin/authentication.asmx';
exports.FormsPath = '_forms/default.aspx?wa=wsignin1.0';

@@ -7,0 +8,0 @@ exports.RtFa = 'rtFa';

2

package.json
{
"version": "1.2.3",
"version": "1.3.0",
"name": "node-sp-auth",

@@ -4,0 +4,0 @@ "author": "Sergei Sergeev <sergeev.srg@gmail.com>",

@@ -15,2 +15,3 @@ # node-sp-auth - nodejs to SharePoint unattended http authentication [![analytics](http://www.google-analytics.com/collect?v=1&t=pageview&tid=UA-87971440-4&cid=8ca0a7b7-186f-4010-8c15-02a66bf95cbc&dl=https%3A%2F%2Fgithub.com%2Fs-KaiNet%2Fnode-sp-auth)]()

* User credentials through the http ntlm handshake
* Form-based authentication (FBA)
* SharePoint Online:

@@ -70,3 +71,5 @@ * Addin only permissions

- [User credentials through the http ntlm handshake:](https://github.com/s-KaiNet/node-sp-auth/wiki/SharePoint%20on-premise%20user%20credentials%20authentication)
`username`, `password`, `domain`, `workstation`
`username`, `password`, `domain`, `workstation`
- [User credentials for form-based authentication (FBA):](https://github.com/s-KaiNet/node-sp-auth/wiki/SharePoint%20on-premise%20FBA%20authentication)
`username`, `password`, `fba` = true

@@ -78,2 +81,3 @@ - SharePoint Online:

`username` , `password`
- [ADFS user credentials:](https://github.com/s-KaiNet/node-sp-auth/wiki/ADFS%20user%20credentials%20authentication)

@@ -80,0 +84,0 @@ `username`, `password`, `relyingParty`, `adfsUrl`, `adfsCookie`

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc