1
Fork 0
mirror of https://github.com/jech/galene.git synced 2024-11-22 16:45:58 +01:00
Commit graph

9 commits

Author SHA1 Message Date
Juliusz Chroboczek
3409f5a27f Replace uses of os.IsExist and os.IsNotExist with errors.Is.
The former don't properly unwrap errors.
2024-04-14 13:34:32 +02:00
Juliusz Chroboczek
68887f13d5 Rename tokens.Edit to Extend. 2024-04-14 13:21:55 +02:00
Juliusz Chroboczek
5aff224e62 Complete token.stateful.Clone. 2023-07-09 11:52:13 +02:00
Juliusz Chroboczek
e73aaa31d7 Remove tokens.Del.
It was unused.
2023-07-09 11:51:18 +02:00
Juliusz Chroboczek
0de0199742 Resynchronise with disk when editing tokens.
We used to assume that the in-memory representation is in sync
when editing a stateful token.  That is usually the case, since
editing requires knowing the token to edit, but resynchronising
here is the right thing to do.
2023-05-19 15:08:05 +02:00
Juliusz Chroboczek
3c0dbf5e9b Reliably return an error from token.Parse.
We would sometimes return nil cast to an interface with no error,
which would cause the server to crash with a null dereference.
2023-05-14 21:14:59 +02:00
Juliusz Chroboczek
8775ce6406 Keep track of issuer and creation date in tokens. 2023-04-08 21:13:35 +02:00
Juliusz Chroboczek
adf273f9ea Expire expired tokens.
We now remove a token a week after it has expired.
2023-04-04 01:22:05 +02:00
Juliusz Chroboczek
a6314a7384 Implement stateful tokens.
Stateful tokens look just like cryptographic tokens to the client.
Unlike cryptographic tokens, they are stored in a file and are
revokable and editable.
2023-04-04 00:59:54 +02:00