Skip to content
This repository was archived by the owner on May 5, 2025. It is now read-only.

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

Merged
noetarbouriech merged 8 commits into
mainfrom
feat/auth
Jul 9, 2023
Merged

feat(auth): implement all authentication related commands#5
noetarbouriech merged 8 commits into
mainfrom
feat/auth

Conversation

@noetarbouriech

@noetarbouriech noetarbouriech commented Jul 8, 2023

Copy link
Copy Markdown
Member

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
@noetarbouriech noetarbouriech requested a review from mfernd July 8, 2023 23:06
Comment thread internal/config/config.go
@noetarbouriech noetarbouriech requested a review from mfernd July 9, 2023 00:07

@mfernd mfernd left a comment

Copy link
Copy Markdown
Member

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
@noetarbouriech noetarbouriech deleted the feat/auth branch July 9, 2023 00:15
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.

2 participants