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

Adding Log In/Out and CORS functionality for the Vue dev Server #2617

Merged
merged 15 commits into from
Jul 18, 2022

Conversation

ZacharyLPalmer
Copy link
Contributor

Description

Combo PR between myself and Jamie. Adding in the Logging in and out functionality to Magma and enabling cors on the various API routes so that we can utilize the Vue development server for front end development

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • [ X ] New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Verified that we are now able to access the API's on localhost:3000 and we are now able to login and logout as expected.

Checklist:

  • [ X ] My code follows the style guidelines of this project
  • [ X ] I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works

Copy link
Contributor

@argaudreau argaudreau left a comment

Choose a reason for hiding this comment

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

Couple of questions, but overall works as intended! Really clever work to make enabling cors a dynamic thing 🚀

app/service/app_svc.py Outdated Show resolved Hide resolved
app/service/app_svc.py Outdated Show resolved Hide resolved
server.py Show resolved Hide resolved
@argaudreau
Copy link
Contributor

You'll also want to remove Magma from the .gitmodules file so that tests can pass. The CI tests will try and pull it down if it's there which will always result in a permissions error.

@ZacharyLPalmer ZacharyLPalmer removed the request for review from wbooth June 30, 2022 14:49
@ZacharyLPalmer
Copy link
Contributor Author

You'll also want to remove Magma from the .gitmodules file so that tests can pass. The CI tests will try and pull it down if it's there which will always result in a permissions error.

So I did remove it from .gitmodules and it's still failing, not sure what's going on with that...

@argaudreau argaudreau self-requested a review June 30, 2022 16:53
@argaudreau argaudreau merged commit 0dfe1e5 into magma Jul 18, 2022
@argaudreau argaudreau deleted the magma-auth branch July 18, 2022 12:32
elegantmoose pushed a commit that referenced this pull request Feb 11, 2024
* Enable cors in server

* cors now working with login api

* return status 401 on wrong credentials

* cleaning up the app_svc file a bit

* change logout endpoint to stop serving template

* CORS now working on localhost:3000

* Add aiohttp-cors to requirements file

* Removing magma as a submodule in order to pass git tests

* Remove magma submodule

* Add back optional param for requirements

* Add compiled front-end dist directory

Co-authored-by: Adam Gaudreau <agaudreau@mitre.org>
Co-authored-by: Palmer <zpalmer@mm273285-pc.lan>
Co-authored-by: JamieScottC <scott.jams@gmail.com>
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.

3 participants