Commit graph

49 commits

Author SHA1 Message Date
Bilal Elmoussaoui
612e872afc Avoid public fields
Some checks failed
CI / Check (push) Has been cancelled
CI / Test Suite (push) Has been cancelled
CI / Rustfmt (push) Has been cancelled
CI / Clippy (push) Has been cancelled
CI / cargo-deny (push) Has been cancelled
Makes it hard to change internal details without breaking API. Instead expose getters where needed;
We might need to go through the publicly exposed API and only keep the bare minimum
2025-02-16 16:55:31 +01:00
Bilal Elmoussaoui
6382ec4c68 Avoid get_ in functions
Also simplify the hashing function
2025-02-16 16:44:23 +01:00
Bilal Elmoussaoui
a1241272c8 reformat 2025-02-16 16:39:29 +01:00
Bilal Elmoussaoui
0b09d632ab examples: Remove unused imports 2025-02-16 16:39:23 +01:00
8e71674bf1
doc: typo
Some checks are pending
CI / Check (push) Waiting to run
CI / Test Suite (push) Waiting to run
CI / Rustfmt (push) Waiting to run
CI / Clippy (push) Waiting to run
CI / cargo-deny (push) Waiting to run
2025-02-16 13:34:45 +01:00
43dcec3625
fix: oath type parsing mismatches
doc: oath credential id
2025-02-16 13:33:00 +01:00
b7b4e79c14
doc: document constants
Some checks are pending
CI / Check (push) Waiting to run
CI / Test Suite (push) Waiting to run
CI / Rustfmt (push) Waiting to run
CI / Clippy (push) Waiting to run
CI / cargo-deny (push) Waiting to run
2025-02-15 23:01:46 +01:00
c596cfbcd9
refactor: make clippy happy
Some checks are pending
CI / Check (push) Waiting to run
CI / Test Suite (push) Waiting to run
CI / Rustfmt (push) Waiting to run
CI / Clippy (push) Waiting to run
CI / cargo-deny (push) Waiting to run
2025-02-15 19:10:46 +01:00
60e7b72ef5
fix: fix broken regex retrieval potentially segfaulting 2025-02-15 18:49:55 +01:00
a4d5826c0e
chore: drop base64 dependency 2025-02-15 17:04:22 +01:00
d29370d398
refactor: cleanup unused code, drop lib_ prefix from name 2025-02-15 16:24:40 +01:00
6a88a4f3de
feat: allow enrolling new credentials 2025-02-15 14:40:05 +01:00
75c869defd
feat: version check guards 2025-02-15 12:42:43 +01:00
d57c03e643
feat: check locked state
Some checks are pending
CI / Check (push) Waiting to run
CI / Test Suite (push) Waiting to run
CI / Rustfmt (push) Waiting to run
CI / Clippy (push) Waiting to run
CI / cargo-deny (push) Waiting to run
2025-02-15 10:40:14 +01:00
1ffd5b1c87
feat: add passphrase support
Some checks are pending
CI / Check (push) Waiting to run
CI / Test Suite (push) Waiting to run
CI / Rustfmt (push) Waiting to run
CI / Clippy (push) Waiting to run
CI / cargo-deny (push) Waiting to run
2025-02-15 01:31:40 +01:00
ef953aed58
clean up lifetimes
Some checks are pending
CI / Check (push) Waiting to run
CI / Test Suite (push) Waiting to run
CI / Rustfmt (push) Waiting to run
CI / Clippy (push) Waiting to run
CI / cargo-deny (push) Waiting to run
2025-02-13 23:01:49 +01:00
7d3600d684
refactor: use Duration, SystemTime and Range<SystemTime> 2025-02-13 22:54:41 +01:00
3a4b703a44
Merge pull request #2 from bilelmoussaoui/bilelmoussaoui/cleanup
Some checks are pending
CI / Check (push) Waiting to run
CI / Test Suite (push) Waiting to run
CI / Rustfmt (push) Waiting to run
CI / Clippy (push) Waiting to run
CI / cargo-deny (push) Waiting to run
follow up of the previous one
2025-02-13 18:07:06 +01:00
Bilal Elmoussaoui
01d98dc807 setup ci along with cargo deny 2025-02-13 13:36:41 +01:00
Bilal Elmoussaoui
a3b5ae9839 fix clippy warnings 2025-02-13 13:28:48 +01:00
Bilal Elmoussaoui
36b15e87b2 silence unused warning for now
so we can run clippy on CI, we can drop it later once the api is complete
2025-02-13 13:26:14 +01:00
Bilal Elmoussaoui
c83a9c6739 drop duplicated function 2025-02-13 13:16:18 +01:00
Bilal Elmoussaoui
26fc4f1aae get rid of strum dependency
the enums are small enough, could find a better to rewrite the code later on
as well
2025-02-13 13:16:18 +01:00
Bilal Elmoussaoui
11533edc88 Add missing Error trait impl 2025-02-13 13:16:07 +01:00
bb83774861
Merge branch 'main' of github.com:LordGrimmauld/yubi-oath-rs 2025-02-13 13:09:04 +01:00
3851f17e3d
Merge pull request #1 from bilelmoussaoui/bilelmoussaoui/cleanup
various cleanups
2025-02-13 13:03:47 +01:00
df232e375a
feat: credential rename 2025-02-13 13:02:43 +01:00
Bilal Elmoussaoui
1110537735 turn FormattableErrorResponse into an actual Error type
By removing the NoError variant as it is useless.
2025-02-13 12:45:19 +01:00
Bilal Elmoussaoui
dfdc63d424 slightly better error handling
by implementing the proper traits for error types
and propagating error where possible
2025-02-13 12:35:40 +01:00
Bilal Elmoussaoui
821229af35 enable some rustfmt nightly features
to keep the grouping automatically
2025-02-13 12:26:03 +01:00
Bilal Elmoussaoui
7767b6e171 cleanup imports round 2 2025-02-13 12:24:17 +01:00
Bilal Elmoussaoui
dd7eb63afb turn into a proper library with a separate example
the example can be built with cargo run --example example
2025-02-13 12:20:35 +01:00
Bilal Elmoussaoui
a111a1b41f cleanup imports 2025-02-13 12:17:09 +01:00
85b8ccea35
better formatting, listing codes without calculate 2025-02-12 18:18:33 +01:00
0c877a859a
improve error propagation and classification 2025-02-12 15:28:19 +01:00
1348183976
hook refresh provider into refreshable cred 2025-02-12 11:03:58 +01:00
8e8c89f39a
recalculate codes 2025-02-11 22:24:24 +01:00
bd5bfe573b
RefreshableOathCode 2025-02-11 21:04:17 +01:00
f63da9e470
plit out CredentialIDData 2025-02-10 21:55:01 +01:00
c407fb0e31
more cleanup 2025-02-10 21:01:25 +01:00
76073ac87f
dependency cleanup 2025-02-10 12:38:03 +01:00
34f1c21bf0
clean up legacy 2025-02-10 10:58:54 +01:00
eeafc231be
split files 2025-02-09 15:57:35 +01:00
565e924baf
hasher cleanup 2025-02-09 14:35:33 +01:00
01485a3168
clean up tlv list parsing 2025-02-08 21:18:02 +01:00
0f74a0945c
more progress 2025-02-08 20:09:08 +01:00
6350e1f6d1
wip 2025-02-06 22:45:29 +01:00
5c01623394
fmt 2025-02-06 12:03:02 +01:00
ec1d1bba0e
reading oath 2025-02-06 12:02:12 +01:00