Comments (6)
getAccessToken() is called by the library to generate the JSON payload to be returned during localhost:3000/ ?
We just have to write a logic to return the accessToken object from this method.And the library will do the internal calling ?
from node-oauth2-server-example.
Hi,
saveAccessToken()
is a method you must implement, and you know it will receive that parameters. This is determined by node-oauth2-server, my project is an example of usage.
getAccessToken()
receives an access token from the user, and checks its validity (must has been generated previously). Also is called by the library, with a determined parameters.
Check node-oauth2-server docs for further explanations.
Thanks.
from node-oauth2-server-example.
okay Thanks,I want some example on how to get refresh token along with access token.And also an example to use a refresh token got previously to get a new access token.
The grant type in the model is to define what all types the protocol supports.So,we can supply any one among those mentioned in the model,in our POST request payload .Am I correct ?
from node-oauth2-server-example.
There is no example of refresh token grant type yet, but you can use it.
Add the desired grant types in server properties and then you can use them in your POST requests.
from node-oauth2-server-example.
Can we use multiple grant types.If yes,should it be separated by commas or by &.
from node-oauth2-server-example.
No, you can send only one grant type by request. But you could request multiple access tokens with multiple requests, I suppose.
from node-oauth2-server-example.
Related Issues (8)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-oauth2-server-example.