sedovalx / oauth2-tester Goto Github PK
View Code? Open in Web Editor NEWSmall application to test responses from different OAuth 2.0 API endpoints
Small application to test responses from different OAuth 2.0 API endpoints
Now it is a JSON in the <pre>
tag. But it should be possible to create a markup for
Request:
Response:
Error:
Flow types should be declared on the backend. It should return them on request. On the other hand frontend should keep the current flow type in the local state and give a user a posibility to select a flow type from the setting dialog.
It should be possible to
Server identity is his name. Should be single save server operation for editing and adding.
Client application should has a 'callback' route for accepting the code in the uri query params.
document.referrer
?When the client do the auth request via the server it should await the token in the response body:
{
response: {
body: {\"access_token\":\"35a70395cea0670c15373e8a05e1e977b3aff913\",\"token_type\":\"bearer\",\"scope\":\"user\"}"
}
}
When a user are browsing the servers the suggested uri should be built. It should depends on
User should be able to edit the suggested request in the request editor.
If the client application on the startup finds the auth code and the state in the URI it should try to restore previous request from the local storage and build request/response.
Должна уметь сохранять следующие поля:
Какой-либо привязке к текущему пользователю наверное не нужно.
Возможно потом привязать историю запросов.
Backend should has the base route for handling callback errors. Important point: the registered callback address should be the base address for auth code callback and for the token callback.
/callback?code=
- redirect to the frontend (payload: code & referrer?)/callback?error=
- redirect to the frontend (payload: error & referrer?)/callback?access_token=
- should complete the frondend "exchangeAuthCode" request #7 with token/callback
+ { access_token } - should complete the frondend "exchangeAuthCode" request #7 with error/callback
+ { error } - should complete the frondend "exchangeAuthCode" request #7 with errorEach server can has a code and token. But for now it only possible to store just one that is parsed from the uri at the app start. Application should find proper server and store the code and token in it.
It should be possible to edit any outgoing request ala Postman.
It comes not as a query parameter but as a hash value in the URI. AppContainer should look for it on the start up.
Front end should
Backend should build auth uri based on the flow type.
Cannot read property 'addEventListener' of null
happens when user removes a query param from the uri. It leads to rerender of the KeyValueList without this param. After that error happens...
Should be a backand controller for executing client requests to an Internet resource. The controller should proxy client requests with preserving headers, body, method and uri of the original request. It should return the original request and the response object to the client. We need to define data contract for such a response:
Front end should call backend operation to start exchange process. Add server method to exchange authorization code for access (and refresh) token.
Input:
Output:
Frontend should pass in an authorization code obtained on the previous step. The backend handler for the client request should
TOKEN_ENDPOINT?client_id=CLIENT_ID&client_secret=CLIENT_SECRET&grant_type=authorization_code&code=AUTHORIZATION_CODE&redirect_uri=CALLBACK_URL
Token info has the format:
{
"access_token":"ACCESS_TOKEN",
"token_type":"bearer",
"expires_in":2592000,
"refresh_token":"REFRESH_TOKEN",
"scope":"read"
}
with possible additional fields.
Привлекательные варианты:
It is difficult to reason about the current flow mode without opening the settings dialog.
Probably they are not saved in the settings editor.
Should store server info:
Ops! Completely forgot about it...
Bearer, what else?
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.