node-sp-auth
Advanced tools
Comparing version 2.2.8 to 2.2.9
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const OnpremiseFbaCredentials_1 = require("./resolvers/OnpremiseFbaCredentials"); | ||
const OnpremiseTmgCredentials_1 = require("./resolvers/OnpremiseTmgCredentials"); | ||
const OnpremiseUserCredentials_1 = require("./resolvers/OnpremiseUserCredentials"); | ||
@@ -17,2 +18,5 @@ const OnlineUserCredentials_1 = require("./resolvers/OnlineUserCredentials"); | ||
} | ||
if (authOptions.isTmgCredentialsOnpremise(siteUrl, options)) { | ||
return new OnpremiseTmgCredentials_1.OnpremiseTmgCredentials(siteUrl, options); | ||
} | ||
if (authOptions.isFbaCredentialsOnpremise(siteUrl, options)) { | ||
@@ -19,0 +23,0 @@ return new OnpremiseFbaCredentials_1.OnpremiseFbaCredentials(siteUrl, options); |
@@ -18,2 +18,5 @@ export interface IBasicOAuthOption { | ||
} | ||
export interface IOnpremiseTmgCredentials extends IUserCredentials { | ||
tmg: boolean; | ||
} | ||
export interface IOnpremiseFbaCredentials extends IUserCredentials { | ||
@@ -43,4 +46,5 @@ fba: boolean; | ||
export declare function isUserCredentialsOnpremise(siteUrl: string, T: IAuthOptions): T is IOnpremiseUserCredentials; | ||
export declare function isTmgCredentialsOnpremise(siteUrl: string, T: IAuthOptions): T is IOnpremiseTmgCredentials; | ||
export declare function isFbaCredentialsOnpremise(siteUrl: string, T: IAuthOptions): T is IOnpremiseFbaCredentials; | ||
export declare function isAdfsCredentials(T: IAuthOptions): T is IAdfsUserCredentials; | ||
export declare function isOndemandCredentials(T: IAuthOptions): T is IOnDemandCredentials; |
@@ -30,2 +30,11 @@ "use strict"; | ||
exports.isUserCredentialsOnpremise = isUserCredentialsOnpremise; | ||
function isTmgCredentialsOnpremise(siteUrl, T) { | ||
let host = (url.parse(siteUrl)).host; | ||
let isOnPrem = host.indexOf('.sharepoint.com') === -1 && host.indexOf('.sharepoint.cn') === -1; | ||
if (isOnPrem && T.username !== undefined && T.tmg) { | ||
return true; | ||
} | ||
return false; | ||
} | ||
exports.isTmgCredentialsOnpremise = isTmgCredentialsOnpremise; | ||
function isFbaCredentialsOnpremise(siteUrl, T) { | ||
@@ -32,0 +41,0 @@ let host = (url.parse(siteUrl)).host; |
@@ -5,2 +5,3 @@ export declare const SharePointServicePrincipal = "00000003-0000-0ff1-ce00-000000000000"; | ||
export declare const FbaAuthEndpoint = "_vti_bin/authentication.asmx"; | ||
export declare const TmgAuthEndpoint = "CookieAuth.dll?Logon"; | ||
export declare const FormsPath = "_forms/default.aspx?wa=wsignin1.0"; | ||
@@ -7,0 +8,0 @@ export declare const RtFa = "rtFa"; |
@@ -7,2 +7,3 @@ "use strict"; | ||
exports.FbaAuthEndpoint = '_vti_bin/authentication.asmx'; | ||
exports.TmgAuthEndpoint = 'CookieAuth.dll?Logon'; | ||
exports.FormsPath = '_forms/default.aspx?wa=wsignin1.0'; | ||
@@ -9,0 +10,0 @@ exports.RtFa = 'rtFa'; |
{ | ||
"version": "2.2.8", | ||
"version": "2.2.9", | ||
"name": "node-sp-auth", | ||
@@ -4,0 +4,0 @@ "author": "Sergei Sergeev <sergeev.srg@gmail.com>", |
@@ -18,2 +18,3 @@ # node-sp-auth - nodejs to SharePoint unattended http authentication | ||
* Form-based authentication (FBA) | ||
* Forefront TMG authentication | ||
* SharePoint Online: | ||
@@ -77,2 +78,4 @@ * Addin only permissions | ||
`username`, `password`, `fba` = true | ||
- User credentials for Forefront TMG (reverse proxy): | ||
`username`, `password`, `tmg` = true | ||
@@ -79,0 +82,0 @@ - SharePoint Online: |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
86902
70
1616
108
6