dmitry-n-medvedev / feather Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
It should issue Account and Access tokens.
Executable.
The Auth Server authenticates requests for questionnaire static files managed by the NGINX.
The NGINX contacts the Auth Server before serving JSON files to the Client. The Auth Server sits behind the HAproxy with the token provided by the client.
NOTE: the NGINX should somehow pass the URL the Client tries to access and the Token the Client supplies.
See: https://docs.nginx.com/nginx/admin-guide/security-controls/configuring-subrequest-authentication/
NOTE:
If the proxy_pass
directive is specified with a URI, then when a request is passed to the server, the part of a normalized request URI matching the location is replaced by a URI specified in the directive:
location /name/ {
proxy_pass http://127.0.0.1/remote/;
}
If proxy_pass
is specified without a URI, the request URI is passed to the server in the same form as sent by a client when the original request is processed, or the full normalized request URI is passed when processing the changed URI:
location /some/path/ {
proxy_pass http://127.0.0.1;
}
This should run in a Docker container.
The NGINX must be employed to serve static questionnaire json files. The NGINX must contact the Auth Server for authorization.
See: https://docs.nginx.com/nginx/admin-guide/security-controls/configuring-subrequest-authentication/
This should run under either PM2, or in a Docker container
AccountToken and AccessToken creation and validation should involve using Redis as DB.
this looks like a more suitable approach
get /questionnaire.json
post /questionnaire
<function-name> <file-path>
I need initial setup of the project's layout
This library will be used in the AuthServer.
The AuthServer will sit behind the NGINX which will authenticate all requests to the static json files (questionnaires) under its control via the AuthServer.
See: https://docs.nginx.com/nginx/admin-guide/security-controls/configuring-subrequest-authentication/
after a client answers all the poll's questions, he should be able to post the result to /get-offer
resided on the file server.
the workflow:
<file-server>/get-offer
supplying the Access Token in the Authorization headerDesign a Questionnaire layout
Design a Questionnaire Response layout
TODO:
see:
I should be able to generate and validate an AccountToken.
Devise two functions for token verification: verifyAccountToken, and verifyAccessToken. The function should take serialized token as parameter.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.