Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor eligibility verification into reusable package #38

Closed
thekaveman opened this issue Oct 15, 2021 · 1 comment · Fixed by #228
Closed

Refactor eligibility verification into reusable package #38

thekaveman opened this issue Oct 15, 2021 · 1 comment · Fixed by #228
Assignees

Comments

@thekaveman
Copy link
Member

thekaveman commented Oct 15, 2021

This is a corollary to cal-itp/benefits#141, with which this work must coordinate. See that issue for the general overview.

Server specifics

eligibility_server/verify.py is where the server-side implementation lives.

Some of the code there is setting up the flask_restful resource and dealing with HTTP request processing, and that would stay. Anything concerned with creating and processing the Eligibility Request and Response objects could be moved into the new package:

@angela-tran
Copy link
Member

I did some analysis on how easily we can replace eligibility-server code with calls to eligibility-api, given all the development that's happened in server since cal-itp/benefits#141 was done.

_get_token_payload and _make_token should be easy to do. It's almost a direct replacement - here's a diff of those two functions in eligibility-api vs. eligibility-server.
image

eligibility-api does not currently have logic for crafting the response payload, so we'll need to figure out what that function should look like.

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

Successfully merging a pull request may close this issue.

2 participants