Skip to content
This repository has been archived by the owner on Feb 28, 2021. It is now read-only.

Commit

Permalink
Merge pull request #64 from auth0-extensions/DXEX-508-allow-set-custo…
Browse files Browse the repository at this point in the history
…m-headers-auth0-managementClient

DXEX-508 allow set custom headers auth0 management client
  • Loading branch information
luisbritos authored Apr 24, 2020
2 parents a71714b + d96964d commit 033867a
Show file tree
Hide file tree
Showing 8 changed files with 613 additions and 167 deletions.
756 changes: 597 additions & 159 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "auth0-deploy-extensions",
"version": "3.3.0",
"version": "3.4.0",
"description": "Auth0 Deployment Extensions",
"engines": {
"node": "5.9.0"
Expand Down Expand Up @@ -81,7 +81,7 @@
"@octokit/rest": "^17.1.4",
"async": "2.1.2",
"auth0": "^2.23.0",
"auth0-extension-express-tools": "^2.0.1",
"auth0-extension-express-tools": "^2.1.0",
"auth0-extension-tools": "1.4.5",
"auth0-extension-ui": "^1.0.1",
"auth0-oauth2-express": "^1.1.8",
Expand Down
6 changes: 5 additions & 1 deletion server/routes/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import excludes from './excludes';
import mappings from './mappings';
import deploy from '../lib/deploy';
import config from '../lib/config';
import { version as packageVersion } from '../../package.json';

const { getOptions } = require(`../lib/providers/${process.env.A0EXT_PROVIDER}`);

Expand All @@ -22,7 +23,10 @@ export default (storage) => {
api.use(middlewares.managementApiClient({
domain: config('AUTH0_DOMAIN'),
clientId: config('AUTH0_CLIENT_ID'),
clientSecret: config('AUTH0_CLIENT_SECRET')
clientSecret: config('AUTH0_CLIENT_SECRET'),
headers: {
'User-agent': `${process.env.A0EXT_PROVIDER}-deploy-ext/${packageVersion} (node.js/${process.version.replace('v', '')})`
}
}));

api.use('/excludes', excludes(storage));
Expand Down
6 changes: 5 additions & 1 deletion server/routes/webhooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { middlewares } from 'auth0-extension-express-tools';

import config from '../lib/config';
import deploy from '../lib/deploy';
import { version as packageVersion } from '../../package.json';

const middleware = require(`../lib/middlewares/${process.env.A0EXT_PROVIDER}`);

Expand All @@ -11,7 +12,10 @@ export default (storage) => {
webhooks.use(middlewares.managementApiClient({
domain: config('AUTH0_DOMAIN'),
clientId: config('AUTH0_CLIENT_ID'),
clientSecret: config('AUTH0_CLIENT_SECRET')
clientSecret: config('AUTH0_CLIENT_SECRET'),
headers: {
'User-agent': `${process.env.A0EXT_PROVIDER}-deploy-ext/${packageVersion} (node.js/${process.version.replace('v', '')})`
}
}));

webhooks.post('/deploy/:secret?', middleware(), (req, res) => {
Expand Down
2 changes: 1 addition & 1 deletion webtask-templates/bitbucket.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"title": "Bitbucket Deployments",
"name": "auth0-bitbucket-deploy",
"version": "3.3.0",
"version": "3.4.0",
"preVersion": "2.10.0",
"author": "auth0",
"description": "This extension gives Auth0 customers the possibility to deploy Hosted Pages, Rules and Custom Database Connections from Bitbucket.",
Expand Down
2 changes: 1 addition & 1 deletion webtask-templates/github.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"title": "GitHub Deployments",
"name": "auth0-github-deploy",
"version": "3.3.0",
"version": "3.4.0",
"preVersion": "2.10.0",
"author": "auth0",
"description": "This extension gives Auth0 customers the possibility to deploy Pages, Rules and Custom Database Connections from GitHub.",
Expand Down
2 changes: 1 addition & 1 deletion webtask-templates/gitlab.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"title": "GitLab Deployments",
"name": "auth0-gitlab-deploy",
"version": "3.3.0",
"version": "3.4.0",
"preVersion": "2.11.0",
"author": "auth0",
"description": "This extension gives Auth0 customers the possibility to deploy Hosted Pages, Rules and Custom Database Connections from GitLab.",
Expand Down
2 changes: 1 addition & 1 deletion webtask-templates/visualstudio.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"title": "Visual Studio Team Services Deployments",
"name": "auth0-visualstudio-deploy",
"version": "3.3.0",
"version": "3.4.0",
"preVersion": "2.9.0",
"author": "auth0",
"description": "This extension gives Auth0 customers the possibility to deploy Hosted Pages, Rules and Custom Database Connections from Visual Studio Team Services.",
Expand Down

0 comments on commit 033867a

Please sign in to comment.