Skip to content
This repository has been archived by the owner on Jan 14, 2020. It is now read-only.

Flask RESTful #28

Merged
merged 73 commits into from
Apr 30, 2018
Merged

Flask RESTful #28

merged 73 commits into from
Apr 30, 2018

Conversation

tyleryasaka
Copy link
Contributor

@tyleryasaka tyleryasaka commented Apr 25, 2018

Checklist:

  • Code contains relevant tests for the problem you are solving
  • Ensure all new and existing tests pass
  • Update any relevant READMEs and docs
  • Submit to the develop branch instead of master

Description:

Contains commits from #27 (would be easier to review/merge that first)

  • Swaps out apilib in exchange for Flask-RESTful and Marshmallow (And yes, I did try the flask-marshmallow library. It doesn't provide the serialization and deserialization that we need.)
  • Cleans up API interface to be as standard and implementation-agnostic as possible; this API should be able to be replicated in other frameworks (e.g. RoR, Node/Express).
  • Creates documentation for the Attestations API.
  • Have this code up and running on heroku if anyone wants to test it out: http://bridge-server-test.herokuapp.com/

Finishes #21, #22, #8, #9, #7, #3, #23

Tyler Yasaka and others added 30 commits April 23, 2018 16:56
Signature, claim type, and data.
Returns a url that the user can navigate to to authorize Twitter
Returns an attestation if verification is successful
Currently Flask Session is using the filesystem to store session data.
Files are placed in `flask_session`. Eventually we probably want to
switch to Redis or something, but this should do for now.
@tyleryasaka tyleryasaka requested a review from Gzing April 25, 2018 22:55
crazybuster and others added 5 commits April 26, 2018 16:10
If we're only going to check for one thing, it should be the signature. Technically the other pieces of data should be known by the client beforehand, and are not strictly needed in the response.
Before this would throw a key error; now we're returning an error message.
@Gzing
Copy link

Gzing commented Apr 27, 2018

@tyleryasaka is this still in WIP or should I test/review this and try it out on my local?

@tyleryasaka
Copy link
Contributor Author

@Gzing It's ready for review!

Copy link

@Gzing Gzing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
Really digging the restful + marshmallow API setup. 👍

We could add max wrong tries on Phone and Email verification endpoints to make those more secure. Will add that as a separate issue.

Copy link
Contributor

@crazybuster crazybuster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

NOTE: Added an issue for more logic centric exceptions with issue#29, also we should probably change the return types from dicts to better typed return objects.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants