node-sp-auth
Advanced tools
Comparing version 2.2.9 to 2.3.0
@@ -7,4 +7,2 @@ "use strict"; | ||
const _ = require("lodash"); | ||
const fs = require("fs"); | ||
const path = require("path"); | ||
const cookie = require("cookie"); | ||
@@ -16,2 +14,3 @@ const util = require("util"); | ||
const AdfsHelper_1 = require("./../../utils/AdfsHelper"); | ||
const AdfsSamlToken_1 = require("./../../templates/AdfsSamlToken"); | ||
class AdfsCredentials { | ||
@@ -67,4 +66,3 @@ constructor(_siteUrl, _authOptions) { | ||
postTokenData(samlAssertion) { | ||
let tokenPostTemplate = fs.readFileSync(path.join(__dirname, '..', '..', '..', 'templates', 'adfs_saml_token.tmpl')); | ||
let result = _.template(tokenPostTemplate.toString())({ | ||
let result = _.template(AdfsSamlToken_1.template)({ | ||
created: samlAssertion.notBefore, | ||
@@ -71,0 +69,0 @@ expires: samlAssertion.notAfter, |
@@ -7,6 +7,4 @@ "use strict"; | ||
const _ = require("lodash"); | ||
const fs = require("fs"); | ||
const request = require("request-promise"); | ||
const cookie = require("cookie"); | ||
const path = require("path"); | ||
let xmldoc = require('xmldoc'); | ||
@@ -16,2 +14,4 @@ const Cache_1 = require("./../../utils/Cache"); | ||
const AdfsHelper_1 = require("./../../utils/AdfsHelper"); | ||
const OnlineSamlWsfedAdfs_1 = require("./../../templates/OnlineSamlWsfedAdfs"); | ||
const OnlineSamlWsfed_1 = require("./../../templates/OnlineSamlWsfed"); | ||
class OnlineUserCredentials { | ||
@@ -108,3 +108,3 @@ constructor(_siteUrl, _authOptions) { | ||
let rootSiteUrl = siteUrlParsed.protocol + '//' + siteUrlParsed.host; | ||
let tokenRequest = _.template(fs.readFileSync(path.join(__dirname, '..', '..', '..', 'templates', 'online_saml_wsfed_adfs.tmpl')).toString())({ | ||
let tokenRequest = _.template(OnlineSamlWsfedAdfs_1.template)({ | ||
endpoint: rootSiteUrl, | ||
@@ -128,3 +128,3 @@ token: samlAssertion.value | ||
let spFormsEndPoint = `${parsedUrl.protocol}//${host}/${consts.FormsPath}`; | ||
let samlBody = _.template(fs.readFileSync(path.join(__dirname, '..', '..', '..', 'templates', 'online_saml_wsfed.tmpl')).toString())({ | ||
let samlBody = _.template(OnlineSamlWsfed_1.template)({ | ||
username: this._authOptions.username, | ||
@@ -131,0 +131,0 @@ password: this._authOptions.password, |
@@ -6,4 +6,2 @@ "use strict"; | ||
const util = require("util"); | ||
const fs = require("fs"); | ||
const path = require("path"); | ||
const url = require("url"); | ||
@@ -15,2 +13,3 @@ const request = require("request-promise"); | ||
const consts = require("./../../Consts"); | ||
const FbaLoginWsfed_1 = require("./../../templates/FbaLoginWsfed"); | ||
class OnpremiseFbaCredentials { | ||
@@ -33,3 +32,3 @@ constructor(_siteUrl, _authOptions) { | ||
} | ||
let soapBody = _.template(fs.readFileSync(path.join(__dirname, '..', '..', '..', 'templates', 'fba_login_wsfed.tmpl')).toString())({ | ||
let soapBody = _.template(FbaLoginWsfed_1.template)({ | ||
username: this._authOptions.username, | ||
@@ -36,0 +35,0 @@ password: this._authOptions.password |
@@ -6,5 +6,4 @@ "use strict"; | ||
const _ = require("lodash"); | ||
const fs = require("fs"); | ||
const path = require("path"); | ||
let xmldoc = require('xmldoc'); | ||
const AdfsSamlWsfed_1 = require("./../templates/AdfsSamlWsfed"); | ||
class AdfsHelper { | ||
@@ -14,4 +13,3 @@ static getSamlAssertion(siteUrl, credentials) { | ||
let usernameMixedUrl = `https://${adfsHost}/adfs/services/trust/13/usernamemixed`; | ||
let samlTemplate = fs.readFileSync(path.join(__dirname, '..', '..', 'templates', 'adfs_saml_wsfed.tmpl')); | ||
let samlBody = _.template(samlTemplate.toString())({ | ||
let samlBody = _.template(AdfsSamlWsfed_1.template)({ | ||
to: usernameMixedUrl, | ||
@@ -18,0 +16,0 @@ username: credentials.username, |
{ | ||
"version": "2.2.9", | ||
"version": "2.3.0", | ||
"name": "node-sp-auth", | ||
@@ -25,3 +25,3 @@ "author": "Sergei Sergeev <sergeev.srg@gmail.com>", | ||
"build": "npm run tslint && tsc -p . && npm run copy", | ||
"copy": "cpy templates/**/* lib/templates && cpy src/auth/resolvers/ondemand/electron/*.* lib/src/auth/resolvers/ondemand/electron", | ||
"copy": "cpy src/auth/resolvers/ondemand/electron/*.* lib/src/auth/resolvers/ondemand/electron", | ||
"dev": "npm run copy && tsc -p . --watch", | ||
@@ -28,0 +28,0 @@ "tslint": "tslint --project tsconfig.json --type-check", |
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
87558
75
1735
8