upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/tests/login.rs
AgeCommit message (Collapse)Author
2024-09-09test: refactor into binary subdirsDanConwayDev
in prep for splitting git_remote_nostr tests
2024-07-17feat(login): use fetch to get user profileDanConwayDev
fetch automatically gets updates to logged in user profile / relays fetching without specifying repo pointers will just fetch user profiles so that can be used during login, if user profile isn't in cache login now uses fetch
2024-06-28feat(login): login with nostr address via nip46DanConwayDev
currently using patched version of rust-nostr with function to fetch nip46 relays from nip05 providers. this patch has been merged so it will make it into the next rust-nostr release.
2024-06-28test: increase timeout for expensive testDanConwayDev
as it is failing intermitantly since it is being run in parellel
2024-06-28feat(login): login with nip46 remote signerDanConwayDev
and save details in git config
2024-06-26refactor: remove fresh test configDanConwayDev
as config is now stored using git config and cache is conditionally stored in local ./git folder under test conditions
2024-06-24feat(login): store in git config and use cacheDanConwayDev
replace ngit yaml file config with: * nsec / ncryptsec / npub in git config in nostr.* namespace * sql database cache for metadata and relay events allow different logins to be used for different git repositories by storing login in local git config
2024-06-11refactor: bump rust-nostr to v0.30 use ncryptsecDanConwayDev
bump nostr and nostr-sdk packages and also in test_utils remove custom ncryptsec implementation and use the newly added implementation nip49 version in rust-nostr note a patched v0.30 is used so that log_n is exposed so that user can be warned it might take a few seconds to decrypt. this has now been merged into the library. note that this will no longer decrypt existing ncryptsec values as it is uses a longer string. this should therefore be bundled with the upcoming change to storing nsec and ncryptsec in git config.
2024-02-15fix: improve 'searching for profile updates' msgDanConwayDev
it wasn't clear why no results were coming back from relays or why it is needs (added reference to relay updates)
2024-02-02test: replace block_on with tokio::testsjk
This is intended to improve the reliabilty of the tests. there have been particular issues with random tests never ending when run in the nix configuration see discussion here https://github.com/DanConwayDev/ngit-cli/issues/ 6#issuecomment-1918971239 and: https://github.com/DanConwayDev/ngit-cli/pull/7
2024-01-27fix(login): stop bailing when no name in metadataDanConwayDev
now falls back to displayName, display_name or npub test pass when loggined printed to the cli in e0f543e8adb144f6deff6ff7ea0c412c9fcac5b4 are commented out
2024-01-26chore: upgrade rust-nostr v0.27.0v0.1.1DanConwayDev
this is a contribution from jk (sectore) that I rebased and squashed into this commit. the tests were broken in the last few commits to rush out some fixes. this change may introduce more issues because of Relay.respond_standard_req.
2023-11-01feat(login) fetch from discovered write relaysDanConwayDev
immediately request metadata and relay list from any newly discovered user write relays
2023-10-01feat(login) fetch user relays and metadataDanConwayDev
get user relay list and metadata events from relays when keys are used and last fetch attempt was more than an hour ago uses user's write relays if known, otherwise uses fallback relays to achieve this a method for intergration testing event fetching from relays was added
2023-09-01feat(login) password login using encrypted nsecDanConwayDev
Enables the user to only handle the nsec upon first use of the tool by encrypting it with a password and storing it on disk in an application cache. The approach to encryption draws heavily from that used by the gossip nostr client. - unencrypted nsec is zeroed from memory - a salt is used to defend against rainbow tables - computationally expensive key stretching defends against brute-force attacks of passwords with low entropy. There is UX trade-off between decryption speed and key-stretching computation. This UX challenge is exacerbated in a cli tool as decryption must take place more regularly. Thought was put into the selected n_log and a heavily reduced value is provided for long passwords where security benefits are smaller. A more granular reducing in computation was also considered by rejected to avoided to revealing just how weak a password is as most weak passwords are reused.
2023-09-13refactor: rebuild app skeletonDanConwayDev
Create skeleton for a complete rebuild of the prototype as a production ready product. Includes design patterns for: - dependency injection - unit testing with dependency mocking - integration testing - error handling - config storage BREAKING-CHANGE: ground-up redesign with incompatible protocol standards