Skip to content

👽 Oauth client credientials grant access token#231

Merged
lishanl merged 7 commits intomainfrom
feature/oauth-access-token
Jan 7, 2026
Merged

👽 Oauth client credientials grant access token#231
lishanl merged 7 commits intomainfrom
feature/oauth-access-token

Conversation

@lishanl
Copy link
Copy Markdown
Collaborator

@lishanl lishanl commented Dec 31, 2025

Add to OfflineTokenABC class a new method obtain_client_credentials_token to get the access token by custom app client id and client secret

* Add methods to set and check token expiration.
* Introduce ClientCredentialsTokenModel for managing client credentials.
* Update validation to use TOKEN_EXPIRATION_BUFFER_SECONDS for timestamp checks.
* Modify OfflineTokenABC docstring to clarify token expiry behavior.
@lishanl lishanl self-assigned this Dec 31, 2025
@lishanl lishanl changed the title 👽 Oauth client credientials grant access token 👽 Oauth client credientials grant access token Dec 31, 2025
UTF8ENCODING = 'utf-8'
API_CALL_NUMBER_RETRY_ATTEMPTS = 5

TOKEN_EXPIRATION_BUFFER_SECONDS = 300
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.

@lishanl What does this do?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@lishanl What does this do?

Consider the token expired 5 min before the actual expiration (when used in the check) - a pretty generous time buffer for the calculation to detect token expiration for any renewal

@lishanl lishanl merged commit 708d76c into main Jan 7, 2026
6 checks passed
@lishanl lishanl deleted the feature/oauth-access-token branch January 7, 2026 09:58
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