You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
5
Versioning](https://semver.org/spec/v2.0.0.html).
6
6
7
7
## [Unreleased]
8
+
- Add optional SQLite persistence via `Database.SqliteFile` config option; defaults to in-memory when not set (see [#20](https://github.com/BusinessSimulations/dev-oidc-toolkit/issues/20))
8
9
## [0.5.0]
9
10
- Add configurable user roles through `DevOidcToolkit__Users__INDEX__Roles__INDEX` (see [#17](https://github.com/BusinessSimulations/dev-oidc-toolkit/pull/17))
10
11
- Add runtime user registration at `/users` page (see [#15](https://github.com/BusinessSimulations/dev-oidc-toolkit/issues/15))
Copy file name to clipboardExpand all lines: DevOidcToolkit.Documentation/docs/configuration.md
+76Lines changed: 76 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -59,6 +59,12 @@ This is a list of all of the environment variables that can be used to configure
59
59
<td>https://fake-issuer.example.com</td>
60
60
<td>None (derived from request URL)</td>
61
61
</tr>
62
+
<tr>
63
+
<td>DevOidcToolkit__Database__SqliteFile</td>
64
+
<td>The path to the SQLite database file. When set, data is persisted to this file and survives restarts. When not set, an in-memory database is used and all data is lost on restart.</td>
65
+
<td>/data/dev-oidc-toolkit.db</td>
66
+
<td>None (in-memory)</td>
67
+
</tr>
62
68
<tr>
63
69
<td>DevOidcToolkit__Logging__MinimumLevel</td>
64
70
<td>The minimum log level, possible values are Trace, Debug, Information, Warning, Error, Critical.</td>
The database configuration controls how data is stored. By default, an in-memory database is used and all data
371
+
(including users and clients created at runtime) is lost when the application stops. Set `SqliteFile` to a file path to
372
+
use a SQLite database instead, which persists data between restarts.
373
+
374
+
!!! note "Limitations"
375
+
The SQLite database schema is created automatically on first run using `EnsureCreated`. There are no migrations
376
+
supported — if the schema changes in a future version of dev-oidc-toolkit you may need to delete and recreate the
377
+
database file.
378
+
379
+
<table>
380
+
<thead>
381
+
<tr>
382
+
<th>Property</th>
383
+
<th>Type</th>
384
+
<th>Description</th>
385
+
<th>Example</th>
386
+
<th>Default Value</th>
387
+
</tr>
388
+
</thead>
389
+
<tbody>
390
+
<tr>
391
+
<td>SqliteFile</td>
392
+
<td>string</td>
393
+
<td>Path to the SQLite database file. When set, all data is persisted to this file. When omitted, an in-memory database is used and data is lost on restart.</td>
Copy file name to clipboardExpand all lines: DevOidcToolkit.Documentation/docs/runtime-management.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -56,6 +56,6 @@ URIs are validated on submission to ensure they are properly formatted.
56
56
57
57
## Important Notes
58
58
59
-
-**No Persistence**: Users and clients created at runtime exist only in the in-memory database. They will be lost when the application restarts.
59
+
-**Persistence**: By default, users and clients created at runtime exist only in the in-memory database and will be lost when the application restarts. To persist runtime changes, configure a [SQLite database](configuration.md#database).
60
60
-**Configuration + Runtime**: You can use both configuration-based users/clients and runtime-created ones simultaneously.
61
61
-**Role Management**: Roles created at runtime persist for the lifetime of the application and can be assigned to multiple users.
0 commit comments