-
Notifications
You must be signed in to change notification settings - Fork 121
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use environment vars w/ optional dotenv file in shared samples config
- Loading branch information
1 parent
79002c0
commit 7397554
Showing
14 changed files
with
101 additions
and
156 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,6 @@ dist | |
npm-debug.log | ||
.DS_Store | ||
.vscode | ||
.samples.config.js | ||
.samples.config.js* | ||
testenv | ||
okta-oidc-tck |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
var path = require('path'); | ||
|
||
// Users can also provide the testenv configuration at the root folder: https://www.npmjs.com/package/dotenv | ||
require('dotenv').config({ path: path.join(__dirname, 'testenv') }); | ||
|
||
var ISSUER = process.env.ISSUER || 'https://{yourOktaDomain}.com/oauth2/default'; | ||
var CLIENT_ID = process.env.CLIENT_ID || '{clientId}'; | ||
var CLIENT_SECRET = process.env.CLIENT_SECRET || '{clientSecret}'; | ||
var SPA_CLIENT_ID = process.env.SPA_CLIENT_ID || '{spaClientId}'; | ||
var OKTA_TESTING_DISABLEHTTPSCHECK = process.env.OKTA_TESTING_DISABLEHTTPSCHECK ? true : false; | ||
|
||
module.exports = { | ||
webServer: { | ||
port: 8080, | ||
oidc: { | ||
clientId: CLIENT_ID, | ||
clientSecret: CLIENT_SECRET, | ||
issuer: ISSUER, | ||
appBaseUrl: 'http://localhost:8080', | ||
scope: 'openid profile email', | ||
testing: { | ||
disableHttpsCheck: OKTA_TESTING_DISABLEHTTPSCHECK | ||
} | ||
}, | ||
}, | ||
resourceServer: { | ||
port: 8000, | ||
oidc: { | ||
clientId: SPA_CLIENT_ID, | ||
issuer: ISSUER, | ||
testing: { | ||
disableHttpsCheck: OKTA_TESTING_DISABLEHTTPSCHECK | ||
} | ||
}, | ||
assertClaims: { | ||
aud: 'api://default', | ||
cid: SPA_CLIENT_ID | ||
} | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.