Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NXP-29129: refresh aws s3 token #917

Closed
wants to merge 1 commit into from
Closed

Conversation

nelsonsilva
Copy link
Contributor

No description provided.

@nelsonsilva nelsonsilva requested a review from a team as a code owner May 19, 2020 22:29
@nuxeojenkins
Copy link
Contributor

View issue in JIRA: NXP-29129: Web UI Upload Issues

@nuxeo-web-ui-jx-bot
Copy link
Contributor

⭐ PR built and available in a preview environment nuxeo-nuxeo-web-ui-pr-917 here

credentials.refresh = (cb) =>
this._resource(`upload/${this.batchId}/refreshToken`)
.post()
.then((response) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll add a catch(cb) before merging this

options.awsSessionToken,
);
credentials.expireTime = new Date(options.expiration);
credentials.refresh = (cb) =>
Copy link
Collaborator

Choose a reason for hiding this comment

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

When will this refresh be called? Do we need to implement needsRefresh as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, default needsRefresh implementaton works with the expiration info, see https://github.com/aws/aws-sdk-js/blob/master/lib/credentials.js#L95

Copy link
Collaborator

Choose a reason for hiding this comment

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

👌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
6 participants