Skip to content
This repository was archived by the owner on Oct 7, 2022. It is now read-only.

Conversation

@jsendo
Copy link
Contributor

@jsendo jsendo commented Oct 23, 2019

No description provided.

lib/axios.ts Outdated
}
const oauthEndpoint = "enlb0ktwajm8sen"
const oauthSignature = (await axios.post(`https://${oauthEndpoint}.m.pipedream.net?pipedream_response=1`, payload)).data
config.headers = oauthSignature
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if (!config.headers) config.headers = {}
config.headers.Authorization = oauthSignature.Authorization // check case of key in returned oauthSignature object

... or update the workflow to just return the Authorization header value (instead of the object). But still, just update Authorization header because the config may have other header values.

lib/axios.ts Outdated
request_data: config,
sign,
}
const oauthEndpoint = "enlb0ktwajm8sen"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be nice to abstract this away in lambda maker if we could call some global function or something... but if @casret is cool with this, I'm fine with it as v0.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't feel like lambda maker should export it either. Maybe in the auths param auth.trello.auth1_signer or something?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah i was thinking we could put the appID in auths too

lib/axios.ts Outdated
*/

export default async function(step: any, config) {
export default async function(step: any, config, sign?) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is sign just a boolean? It has to contain app id or something right? Should try to get a better name.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's an object the token and app name, i'll rename it to signConfig?

@jsendo jsendo merged commit 16b9ca7 into master Nov 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants