<feed xmlns='http://www.w3.org/2005/Atom'>
<title>wikiapiserver/main.go, branch master</title>
<subtitle>Small server utility to make working with wikimedia enterprise api a little bit easier.</subtitle>
<link rel='alternate' type='text/html' href='https://git.iamfabulous.de/wikiapiserver/'/>
<entry>
<title>fix: pass through upstream HTTP status codes from /article</title>
<updated>2026-06-25T20:00:25+00:00</updated>
<author>
<name>wikiapiserver</name>
</author>
<published>2026-06-25T20:00:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.iamfabulous.de/wikiapiserver/commit/?id=4907cfb72ef69fb94c49cfb484a5a2907db0dee8'/>
<id>4907cfb72ef69fb94c49cfb484a5a2907db0dee8</id>
<content type='text'>
- Non-2xx responses (404, 429, 5xx) are now forwarded to the
  client with their original status code and response body
- Increased WriteTimeout to 45s to accommodate slow upstream API
- Added explicit resp.Body.Close() and response flush before return
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Non-2xx responses (404, 429, 5xx) are now forwarded to the
  client with their original status code and response body
- Increased WriteTimeout to 45s to accommodate slow upstream API
- Added explicit resp.Body.Close() and response flush before return
</pre>
</div>
</content>
</entry>
<entry>
<title>feat: GET /article endpoint proxies Wikimedia structured contents</title>
<updated>2026-06-25T13:42:32+00:00</updated>
<author>
<name>wikiapiserver</name>
</author>
<published>2026-06-25T13:42:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.iamfabulous.de/wikiapiserver/commit/?id=81258d39db6530699194f860206528c6f09a5238'/>
<id>81258d39db6530699194f860206528c6f09a5238</id>
<content type='text'>
GET /article?username=alice&amp;name=en.wikipedia/Sun
→ proxies to api.enterprise.wikimedia.com/v2/structured-contents/{name}
with Authorization: Bearer &lt;access_token&gt;

Returns 401 for unknown users, 400 if params missing,
and passes through the upstream HTTP status on errors.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
GET /article?username=alice&amp;name=en.wikipedia/Sun
→ proxies to api.enterprise.wikimedia.com/v2/structured-contents/{name}
with Authorization: Bearer &lt;access_token&gt;

Returns 401 for unknown users, 400 if params missing,
and passes through the upstream HTTP status on errors.
</pre>
</div>
</content>
</entry>
<entry>
<title>feat: GET /token?username=... returns access_token and valid_until</title>
<updated>2026-06-25T12:59:59+00:00</updated>
<author>
<name>wikiapiserver</name>
</author>
<published>2026-06-25T12:59:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.iamfabulous.de/wikiapiserver/commit/?id=857fc8bd77e36a45b249b83419c7ba3dde2b792a'/>
<id>857fc8bd77e36a45b249b83419c7ba3dde2b792a</id>
<content type='text'>
Returns the stored access_token and the timestamp when it was
created (access_token_created). Returns 401 for unknown users.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Returns the stored access_token and the timestamp when it was
created (access_token_created). Returns 401 for unknown users.
</pre>
</div>
</content>
</entry>
<entry>
<title>feat: token refresh with age-based logic</title>
<updated>2026-06-25T12:47:35+00:00</updated>
<author>
<name>wikiapiserver</name>
</author>
<published>2026-06-25T12:47:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.iamfabulous.de/wikiapiserver/commit/?id=cc960860e4109b4eb50721d0b3338df4b859d559'/>
<id>cc960860e4109b4eb50721d0b3338df4b859d559</id>
<content type='text'>
- RefreshTokens checks token age and chooses the right path:
  - refresh_token &gt; 90 days: re-auth via WikimediaLogin (full login)
  - access_token &gt; 24 hours: refresh via WikimediaTokenRefresh
  - otherwise: return current tokens
- WikimediaTokenRefresh posts to /v1/token-refresh endpoint
- Login also uses WikimediaLogin instead of local RotateTokens
- Removed dead RotateTokens, RefreshByToken, and randomHex
- DSN includes parseTime=true for timestamp columns
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- RefreshTokens checks token age and chooses the right path:
  - refresh_token &gt; 90 days: re-auth via WikimediaLogin (full login)
  - access_token &gt; 24 hours: refresh via WikimediaTokenRefresh
  - otherwise: return current tokens
- WikimediaTokenRefresh posts to /v1/token-refresh endpoint
- Login also uses WikimediaLogin instead of local RotateTokens
- Removed dead RotateTokens, RefreshByToken, and randomHex
- DSN includes parseTime=true for timestamp columns
</pre>
</div>
</content>
</entry>
<entry>
<title>feat: initial wiki API server with account management</title>
<updated>2026-06-25T10:23:11+00:00</updated>
<author>
<name>wikiapiserver</name>
</author>
<published>2026-06-25T10:22:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.iamfabulous.de/wikiapiserver/commit/?id=6667426e24bba82ade4702cb8f85849bebec6077'/>
<id>6667426e24bba82ade4702cb8f85849bebec6077</id>
<content type='text'>
- HTTP API with JSON over configurable port (default 8080)
- Endpoints: POST /register, POST /login, POST /refresh, GET /health
- MariaDB storage with SHA-256 hashed credentials and tokens
- Token rotation on login and refresh
- Config loaded from config.json (not tracked in git)
- Graceful shutdown on SIGINT/SIGTERM
- Connection pool (25 max open, 10 idle, 5min max lifetime)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- HTTP API with JSON over configurable port (default 8080)
- Endpoints: POST /register, POST /login, POST /refresh, GET /health
- MariaDB storage with SHA-256 hashed credentials and tokens
- Token rotation on login and refresh
- Config loaded from config.json (not tracked in git)
- Graceful shutdown on SIGINT/SIGTERM
- Connection pool (25 max open, 10 idle, 5min max lifetime)
</pre>
</div>
</content>
</entry>
</feed>
