Skip to content

Added client_secret and refresh token function#90

Merged
timo-reymann merged 7 commits intotimo-reymann:mainfrom
rkentish:feature/add_client_secret_and_refresh_call
Jun 26, 2025
Merged

Added client_secret and refresh token function#90
timo-reymann merged 7 commits intotimo-reymann:mainfrom
rkentish:feature/add_client_secret_and_refresh_call

Conversation

@rkentish
Copy link
Copy Markdown
Contributor

Description

  • Added client_secret to configuration object and basic auth header for token request
  • Added new function to use refresh token to aquire new grant
  • Updated version number to 1.6.3

@rkentish
Copy link
Copy Markdown
Contributor Author

@timo-reymann thanks for this lib, helped me simplify a little command line utility for myself that other libraries were making way to complicated. I've put through a small PR to add the ability to specify the client secret and obtain a new grant with the refresh token as I needed these for my project.

Not sure if I've doen the PR correctly as it's my first one I've ever submitted so let me know if there's something eles I need to do.

@timo-reymann timo-reymann self-requested a review June 25, 2025 21:19
Copy link
Copy Markdown
Owner

@timo-reymann timo-reymann left a comment

Choose a reason for hiding this comment

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

Thank you so much for your PR, I just have some smaller comments mostly for keeping backward compability :)

(I use https://conventionalcomments.org/ for writing the review comments)

rkentish and others added 6 commits June 26, 2025 12:21
Co-authored-by: Timo Reymann <mail@timo-reymann.de>
Co-authored-by: Timo Reymann <mail@timo-reymann.de>
Co-authored-by: Timo Reymann <mail@timo-reymann.de>
Co-authored-by: Timo Reymann <mail@timo-reymann.de>
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Jun 26, 2025

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarQube Cloud

@rkentish
Copy link
Copy Markdown
Contributor Author

@timo-reymann implemented those suggestions and added the new test (plus one extra). I was getting port conflicts so implemented random port selection for testing but now getting security warnings. Probably not a real risk but will leave it up to you to decide 😄

Couldn't completely remove the client_secret from the tests as it complained about missing params in the constructor. I'm guessing it's a default constructor based of the class members (?) but without defining an explicit constructor I wasn;t sure how to fix. I figured setting it to None had the same effect?

@timo-reymann timo-reymann merged commit 13b34ae into timo-reymann:main Jun 26, 2025
2 checks passed
@timo-reymann
Copy link
Copy Markdown
Owner

Thanks a lot 🚀

timo-reymann pushed a commit that referenced this pull request Jun 26, 2025
## [2.0.0](1.6.2...2.0.0) (2025-06-26)

### ⚠ BREAKING CHANGES

* Drop support for python 3.9

### Features

* Added client_secret support and refresh token functionality ([#90](#90)) ([13b34ae](13b34ae))

### Bug Fixes

* Drop support for python 3.9 ([ee196e0](ee196e0))
@timo-reymann
Copy link
Copy Markdown
Owner

🎉 This PR is included in version 2.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@rkentish rkentish deleted the feature/add_client_secret_and_refresh_call branch June 29, 2025 01:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants