Skip to content

Adds function for token lifecycle management#13

Merged
johnnyt merged 1 commit intomainfrom
get-app-token
Oct 7, 2025
Merged

Adds function for token lifecycle management#13
johnnyt merged 1 commit intomainfrom
get-app-token

Conversation

@johnnyt
Copy link
Member

@johnnyt johnnyt commented Oct 7, 2025

Implements get_app_token/1 to obtain application-only access tokens with metadata suitable for TokenManager implementations. Unlike Client.fetch_token!/1 which returns just the token string, this function returns {:ok, metadata} with access_token, expires_in, and token_type for accurate token expiration tracking.

This enables TokenManager in MatMan to:

  • Track token expiry accurately using expires_in
  • Handle errors gracefully with {:ok, _} | {:error, _} pattern
  • Store tokens with computed expiration timestamps

🤖 Generated with Claude Code

Implements get_app_token/1 to obtain application-only access tokens with
metadata suitable for TokenManager implementations. Unlike Client.fetch_token!/1
which returns just the token string, this function returns {:ok, metadata}
with access_token, expires_in, and token_type for accurate token expiration
tracking.

This enables TokenManager in MatMan to:
- Track token expiry accurately using expires_in
- Handle errors gracefully with {:ok, _} | {:error, _} pattern
- Store tokens with computed expiration timestamps

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@johnnyt johnnyt merged commit ccba187 into main Oct 7, 2025
6 checks passed
@johnnyt johnnyt deleted the get-app-token branch October 7, 2025 12:45
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.

1 participant