Commit graph

825 commits

Author SHA1 Message Date
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
58dae3a0c9 Remove user create Admin endpoint, and the associated privilege.
If an admin wants to create a user, he or she should have the ISSUE_TOKEN
privilege. The admin can use that to create a one-time registration token,
and then just use the regular registration API with that token.
2023-02-27 18:02:35 +00:00
d89e3fd753 Update TODO 2023-02-27 17:25:39 +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
31be432f7a Just discovered some bugs in Json. 2023-02-25 16:35:33 +00:00
adea499813 Add UiaFlowsFree() function, and clean up some memory issues. 2023-02-24 14:40:21 +00:00
26b0f33f96 -not is not portable, grep -v should work good enough though. 2023-02-24 02:02:47 +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
41421557e0 Update TODO. 2023-02-23 16:46:27 +00:00
4f562167f6 Update TODO 2023-02-23 16:20:15 +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
d81e8f3a32 We're building up some tools; let's print them out in env.sh 2023-02-17 18:26:08 +00:00
3faee8b432 Update TODO items. 2023-02-17 15:03:59 +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
b05e81776a Be smart about the type of man page we generate. 2023-02-16 17:22:32 +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
1f1cbc0461 Fix a bad jq parameter. 2023-02-16 02:01:25 +00:00
dc566a85b7 Ignore .patch files. 2023-02-16 02:01:14 +00:00
85380efa3c [#48] Fix bug in MatrixGetAccessToken() 2023-02-16 01:33:46 +00:00
2ce43ce457 Add a script for conveniently creating new library man pages. 2023-02-16 00:55:10 +00:00
6735c101ec Add Rand man page. 2023-02-16 00:54:58 +00:00
6a593ab8a0 [#48] Add Rand API and make StrRandom() use it. 2023-02-16 00:31:13 +00:00
fdecac576f Some browsers don't like this rule; making it !important seems to fix them. 2023-02-16 00:05:26 +00:00
cebc2959cc Fix a few things that were bothering me. 2023-02-15 21:53:39 +00:00
50aa65617a Fix some bugs in the man page index generation. 2023-02-15 16:00:36 +00:00
de0ece10e2 Use generated tables instead of hand-crafted tables. 2023-02-15 03:30:52 +00:00
e3b8eaf941 Put description all on one line. 2023-02-15 03:30:40 +00:00
a72f75d6b5 Update some man page descriptions. 2023-02-15 02:37:44 +00:00
a7c1ccd3f1 Update lots of documentation. 2023-02-15 01:32:44 +00:00
f7d581538d Begin documenting Str. 2023-02-14 11:56:22 +00:00
653d282bcd Document User API. 2023-02-14 02:02: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
27c4713e5d I actually decided I don't like this. 2023-02-11 00:07:18 +00:00
71a0181a6a Break out static options into an environment variable.
This allows users to turn off static compilation if the compiler or linker
throws a fit about it. Looking at you, Glibc. And PCC doesn't seem to like
static compilation either; it generates a binary that just segfaults
immediately on executation.
2023-02-05 14:46:20 +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