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): Adding token auth #39

Merged
merged 1 commit into from
Jan 24, 2025
Merged

feat(auth): Adding token auth #39

merged 1 commit into from
Jan 24, 2025

Conversation

Jacobbrewer1
Copy link
Owner

Describe your changes

This pull request introduces improvements to the authentication mechanisms in the client library. The changes include adding a new token-based authentication method and ensuring that the authentication information is renewed correctly for all authentication methods.

Enhancements to authentication mechanisms:

  • client_opts.go: Added a new function WithTokenAuth to support token-based authentication.
  • client_opts.go: Modified WithAppRoleAuth and WithUserPassAuth to handle errors more gracefully and to ensure that authentication information is renewed.
  • token.go: Introduced a new file to implement the tokenLogin function for token-based authentication.

Codebase simplification:

  • client.go: Removed the call to renewAuthInfo from the NewClient function to avoid redundant renewals.

@Jacobbrewer1 Jacobbrewer1 merged commit adfa8fc into main Jan 24, 2025
6 checks passed
@Jacobbrewer1 Jacobbrewer1 deleted the feat/token-auth branch January 24, 2025 16:29
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 24, 2025
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.

1 participant