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

API login request with expiring=false now returns feedback #2620

Merged

Conversation

gwiedeman
Copy link
Contributor

Description

Previously, if you tried to send a curl request with expiring=false, it would return successful regardless of if the param was successful. For example curl -s -F password="admin" expiring=false "http://localhost:8089/users/admin/login" would return successfully, but the token would expire because it should be `curl -s -F password="admin" "http://localhost:8089/users/admin/login?expiring=false"

Now, when you send the expiring param the correct way, the response will include a expire_after_seconds field which shows the number of seconds until the token expires. This is set by AppConfig[:session_nonexpirable_force_expire_after_seconds]

Related JIRA Ticket or GitHub Issue

N/A

How Has This Been Tested?

ran it in devserver mode and gave it curl requests to the backend.

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have read the CONTRIBUTING document.
  • I have authority to submit this code.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Not sure if there should tests for this, but just let me know if so and I'll try to include them.

@mark-cooper mark-cooper self-assigned this Jan 26, 2022
@mark-cooper mark-cooper merged commit 3724ffe into archivesspace:master Feb 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants