Giter Club home page Giter Club logo

node-oauth2-server-example's People

Contributors

pedroetb avatar waqassiddiqi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

node-oauth2-server-example's Issues

validate token

after generating client_credentials token how is the token validated ? what is the endpoint for this.

Missing new line in readme for password grant body

In the readme for password grant under Body all paramters are in one line "grant_type=password&username=pedroetb&password=password", it should be three parameters:
grant_type=password
username=pedroetb
password=password

curl examples to use your server

Hi Pedro,

maybe you might want to add these curl commands to your README.md file:

Requesting an access token

curl http://localhost:3000/oauth/token \
  -d "grant_type=password" \
  -d "username=pedroetb" \
  -d "password=password" \
  -d "client_id=application" \
  -d "client_secret=secret" \
  -H "Authentification: Basic YXBwbGljYXRpb246c2VjcmV0" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -v 

This command returns for example:

{
    "token_type":"bearer",
    "access_token":"8fad8f87f2ebb262c917bc0abff9a798dea8ffa4",
    "expires_in":3600
}

Using the token

curl http://localhost:3000 \
  -H "Authorization: Bearer c82b48de6507d5bd6b669a83f616351ee61a11fe" \
  -v  

returns

Congratulations, you are in a secret area!

Best,
Gabriel

clarity regarding the flow

I am new to this oauth framework.Can you brief the flow of your model
Also I want to know who supplies the accessToken to saveAccessToken() function.

expires_in missing

Looking at the Oauth specs aren't we supposed to be returning expires_in instead of accessTokenExpiresAt in our response?

Client credentials grant example

Hi Pedro, I'm new to all these stuff of NodeJs and node-oauth-server. I would love if you post an example like this but with client credentials grant, I did some research and saw that you must have the function getUserFromClient in the model required for auth, but I don't have any idea of how to do this, please Pedro could you help me?
Thanks a lot!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.