Commit graph

3 commits

Author SHA1 Message Date
Tak Wai Wong b4ff83bd96 Remove nonce generation for eip4361 signin (#25)
Co-authored-by: Tak Wai Wong <tak@hntlabs.com>
2022-08-13 13:01:21 -07:00
texuf 850788ba1a Fix lint errors
https://github.com/HereNotThere/dendrite/runs/7417009281?check_suite_focus=true
2022-08-13 13:01:21 -07:00
Tak Wai Wong a501c9b936 Login and Register tests for public key ethereum (#16)
* TestLoginPublicKeyNewSession

* use asserts

* setup, test, asserts

* TestLoginPublicKeyValidAuthTypeMissingSession

* invalid session id test

* create a helper newSession function

* TestLoginPublicKeyEthereumMissingUserId

* TestLoginPublicKeyEthereumAccountNotAvailable

* TestLoginPublicKeyEthereumInvalidUserId

* createEip4361TestMessage

* TestLoginPublicKeyEthereumMissingSignature

* TestLoginPublicKeyEthereum

* re-enable all publickey signin tests

* move common publickey test util to its own file

* register_public_key.go stub

* refactored common ethereum test helpers to its own folder

* refactor test helpers

* return error in test helpers

* fix regressions with ServerName

* TestRegistrationUnimplementedAlgo

* TestNewRegistration

* TestNewRegistrationSession

* verify new login session

* remove assert

* perform account creation

* TestRegisterEthereum

* Enable all tests

* move helper functions into test file

Co-authored-by: Tak Wai Wong <tak@hntlabs.com>
2022-08-13 12:59:33 -07:00