Commit graph

3 commits

Author SHA1 Message Date
Ankur
793a8c5e69
Feature: Implement JWT authentication in REST API (#1785)
* Added jwt auth

* Added get and delete request, also added jwt functions

* Added proper naming conventions and status codes

* Added hashmap for storing key-value pair of jwt tokens

* Updated nomenclature and added descriptions to the Resources

* Implemented nested hashmap of jwt tokens

Signed-off-by: ankur12-1610 <anknerd.12@gmail.com>

* Added jwt token verification which can be used inplace of basic password verification

* Implemented token expiration check

* Added time parser for converting different units to seconds

* Changed parsing method

* Adding seperate token resource instead of secure resource

* Fixed test-rest.py and added token auth to AdminResource

Signed-off-by: ankur12-1610 <anknerd.12@gmail.com>

* Added new tests for jwt endpoints

Signed-off-by: ankur12-1610 <anknerd.12@gmail.com>

* Added documentation for jwt_endpoints

* Added curl and python usage

* reduce differences to master for requirements.txt

* refined API Documentation

* typo

* typos

* fix test

Signed-off-by: ankur12-1610 <anknerd.12@gmail.com>
Co-authored-by: Kim Neunert <k9ert@gmx.de>
2022-10-20 12:17:48 +02:00
Kim Neunert
28e13ca93c
Documentation: hosted at docs.specter.solutions (#1463)
* mkdocs

* adding mkdocs for netlify

* fix theme

* link to Readme

* deleting symlink again

* deleting index.md

* fix release-notes

* several doc improvements and elements installation

* move DEVELOPMENT.md and CONTRIBUTING.md in subfolder

* multi-site setup

* changes site_dir

* revert

* adding mkdoc-wrapper.sh

* removing mkdocs from prod-requirements

* more docs

* fix test ... no more warning
2021-11-24 18:37:46 +01:00
Kim Neunert
e10cea0456
Feature: Api framework (#1232)
* Included API end points

Included 3 API end points:

###/api/specter ["GET"]
Basic Specter info from app.specter class

###/api/full_txlist/ ["GET"]
Full Transaction list for all wallets

###"/api/wallet_info/<wallet_alias>/ ["GET"]
More detailed wallet info and transactions from the app.specter.wallet_manager class

* Update src/cryptoadvance/specter/controller.py

Include `wallet.check_unused()`

Co-authored-by: benk10 <ben.kaufman10@gmail.com>

* API Update

Made a few changes:
- Flattened the wallet list to be similar to full transaction list
- included versioning on url `/v1alpha/`
- Included `wallet.utxo` data
- Improved `safe_serialize` for better json output

Pending Updates:
- Create a separate file for API (as a blueprint)
- Explore using Flask-restful for improved authentication (downside is that it is another dependency - not sure if already a requirement for specter)

* adding a rest-api

* Implemented API end points inside of example.py

* Merging with remote

* Fixed API.md

* Removing example-resources

* migrating to focal due to cryptography needs newer pip

* fix the image

* black and tidy up

* Deleted more useless stuff

* first take for psbt (still broken)

* get tests to work

* fix devices_signed undefined

* fix part2

* fix part 3

* fix part 4

* Rest Get-Requests for psbt working

* fix part 5

* extending psbt_creator with json format

* tests finished. bitcoind_regtest changed to scope session

* speed up tests

* fix tests

* tiny test for LiquidRpc, probes improvements

* try fixing testing-infra

* kick

* finally fix infra, hopefully

* removing assertion

* refactoring and fixing API

* fix the rest-tests

* fix last liquid failing test

* polishing: error_handling via decorator

* split-up docs

* fix requirements.in

* polishing REST-API

* optimize startup for internal_nodes

* Update src/cryptoadvance/specter/internal_node.py

Co-authored-by: benk10 <ben.kaufman10@gmail.com>

Co-authored-by: Alpha Zeta <40473443+pxsocs@users.noreply.github.com>
Co-authored-by: benk10 <ben.kaufman10@gmail.com>
Co-authored-by: Alpha Zeta <alphazeta@protonmail.com>
Co-authored-by: Stepan Snigirev <snigirev.stepan@gmail.com>
2021-07-08 13:10:14 -05:00