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

feat(auth): implement all authentication related commands #5

Merged
merged 8 commits into from
Jul 9, 2023

Conversation

noetarbouriech
Copy link
Member

@noetarbouriech noetarbouriech commented Jul 8, 2023

Changes

  • Implement function Login() which sends a login request to the PaaSTech API.
  • Add a test for the Login() function with a mockup server.
  • Add the possibility for users to choose a custom PaaSTech server URL to log into (for testing purposes for example).
  • Add configuration management using viper and the following config source:
    • ~/.config/paastech/auth.yaml - Storage for user JWT and server url.
  • Add an internal/ directory for internal packages not meant to be imported by third parties.
  • Add a config package which is a helper for managing config files and variables.
  • Implement the following commands:
    • paastech login
    • paastech account
    • paastech logout

Notes

In order to test these changes, you need to have the API running locally and you need to add the following argument to your login command --server http://localhost:3000.
Also, building the app for testing is preferred as it gives better performances and removes useless output present when the program handles errors.

@noetarbouriech noetarbouriech self-assigned this Jul 8, 2023
Copy link
Member

@mfernd mfernd left a comment

Choose a reason for hiding this comment

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

🐀

@noetarbouriech noetarbouriech merged commit d3f59f5 into main Jul 9, 2023
1 check passed
@noetarbouriech noetarbouriech deleted the feat/auth branch July 9, 2023 00:15
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.

2 participants