d899a836b6
Apply #54
2023-03-02 22:06:33 +00:00
f4838f8211
Remove non-standard use of d_type
2023-03-02 02:53:43 +00:00
d6f96757bc
Apply #52 : d_namlen is non-standard.
2023-03-01 21:39:22 +00:00
7a951c980f
Cleanup old user interactive auth sessions.
2023-03-01 19:52:44 +00:00
8c4e6aa594
Implement DbList()
2023-03-01 19:33:25 +00:00
ce6d483135
Implement static login page.
2023-03-01 19:03:42 +00:00
e7d1c0d951
Cross-platform code improvements.
2023-03-01 01:55:26 +00:00
334a711b02
Fix compile error.
2023-03-01 01:23:52 +00:00
2747660473
Add a TODO in Uia
2023-02-28 18:48:43 +00:00
63634407d4
Update TODO.txt, add stub functions in Db.
2023-02-28 18:44:02 +00:00
16c31b63d7
Begin work on static login page.
2023-02-28 17:52:09 +00:00
36169181dd
Build basic framework for creating static pages.
...
The login fallback, as well as the user-interactive authentication
fallbacks, are static HTML pages.
2023-02-28 16:51:40 +00:00
fae9eb4473
Implement password-based user interactive authentication.
2023-02-28 15:17:11 +00:00
e2806bc810
Add UserIdParse() and UserIdFree() functions.
...
The spec says that a username can be either just the localpart, or a
localpart and a server. This commit now ensures that the login endpoint
actually handles usernames properly by calling the proper parsing
functions.
2023-02-28 13:44:34 +00:00
6ce6cb4525
Implement flow handling in Uia API.
...
This commit should fix user interactive authentication for dummy flows,
but I still have to implement a few more flows, including passwords and
refresh token. I also have to fix the cleanup logic: when do we purge
UIA sessions?
2023-02-27 15:39:12 +00:00
7703405c70
Fix bugs in Json API.
2023-02-26 15:07:46 +00:00
adea499813
Add UiaFlowsFree() function, and clean up some memory issues.
2023-02-24 14:40:21 +00:00
d517b66316
Also delete refrsh token if present for device.
2023-02-24 01:06:02 +00:00
b60cac53e5
Make JsonValueString() call StrDuplicate(); refactor code to behave properly.
2023-02-24 00:17:56 +00:00
8c96fd8d7d
Begin the great StrDuplicate() refactor.
2023-02-23 23:19:23 +00:00
b99e8bd1cd
Apply modified #50 and fix some misc. bugs.
2023-02-23 15:13:39 +00:00
9e9b5c9cda
Fix a write-out-of-bounds error in Json.
2023-02-23 03:46:05 +00:00
3bbff5379f
[WIP] Replace UserInteractiveAuth with a new Uia API.
...
Uia is a lot less characters to type. Do note that this API is far from
complete and this commit breaks user interactive authentication entirely.
2023-02-19 14:58:56 +00:00
fa88fc3323
Format source code.
2023-02-17 03:23:25 +00:00
ff879e715f
Finish implementing token refresh.
...
This implementation just keeps the refresh token and only updates the
access token. The spec says that this is allowed. There's really no
reason to do this, other than the fact that it's easier.
2023-02-17 03:20:49 +00:00
4b336de171
Build out the User API a bit more.
2023-02-17 03:18:24 +00:00
46fe667988
Add HashMapGetKey() so we can free bucket keys before deleting them.
2023-02-17 03:14:43 +00:00
feb11de6b0
Fix some compile warnings. I'll get back to this eventually.
2023-02-16 18:51:10 +00:00
72405a94f6
Add JsonGet(), JsonSet(), and JsonCreate() for convenience.
2023-02-16 18:49:19 +00:00
d255ce1a21
Begin working on refresh route.
2023-02-16 17:22:59 +00:00
c78dc3bd31
Fix a memory bug in StrRandom() with RandIntN().
...
We're storing integers in this buffer, so we have to allocate enough
memory for them. An integer is usually more than one byte.
2023-02-16 13:10:09 +00:00
38438c297e
Looks like Matrix v1.6 is out.
2023-02-16 02:09:57 +00:00
85380efa3c
[ #48 ] Fix bug in MatrixGetAccessToken()
2023-02-16 01:33:46 +00:00
6a593ab8a0
[ #48 ] Add Rand API and make StrRandom() use it.
2023-02-16 00:31:13 +00:00
f7d581538d
Begin documenting Str.
2023-02-14 11:56:22 +00:00
5fef788053
Begin documenting User API
2023-02-12 02:31:14 +00:00
2443c91bba
Fix bug in HashMap that would allow iterating over deleted values.
2023-02-11 00:15:49 +00:00
8b8873103d
Handle standard library quirks of non-conforming systems and compilers.
2023-02-05 14:20:12 +00:00
dc972385ea
Don't shadow variables.
2023-02-05 14:19:07 +00:00
5b77236e82
Fix -v option
2023-01-17 21:38:39 +00:00
e0f7c133d1
Add a non-JSON landing page. This is the basis for other HTML pages.
2023-01-17 20:29:16 +00:00
b0b2f11158
Refactor endpoint authentication flow.
...
Instead of one MatrixAuthenticate() function, we'll do
MatrixGetAccessToken(), and then UserAuthenticate(). This allows us to
give different error messages depending on what the user provided and what
the server state is.
2023-01-17 01:36:22 +00:00
1e02971a7e
Implement login route.
2023-01-17 00:02:50 +00:00
cc95c10f44
Move client well-known generation to MatrixClientWellKnown() function.
...
We'll be using this for client login.
2023-01-16 22:02:08 +00:00
121682c006
Implement user login.
2023-01-16 21:17:44 +00:00
bd88c01c26
Don't read the timestamp after it's freed.
2023-01-16 03:57:01 +00:00
c0309c1ea8
Fix memory leak when log timestamp is not set in the config.
2023-01-16 03:21:59 +00:00
a4364dbb68
Fix use after free.
2023-01-10 00:38:47 +00:00
599fa1a740
Document MemoryHexDump() and DbExists()
2023-01-09 21:39:59 +00:00
b8ce4c9239
Lock database in DbExists() to prevent race conditions.
2023-01-09 19:25:49 +00:00