Skip to content
This repository has been archived by the owner on Sep 25, 2023. It is now read-only.

Latest commit

 

History

History
51 lines (29 loc) · 1.72 KB

README.md

File metadata and controls

51 lines (29 loc) · 1.72 KB

oauth2-server-example

npm install -g coffee-script
npm install

coffee src/seed.coffee # creates the test user and app
npm start # runs the server

Example using the password and authorization_code grant types

You go to /...

1

...the secret room is locked...

2

...but if you configure Basic Auth with the clientId and clientSecret...

3

...and do an OAuth2 request...

4

...all is fine 😃...

5

...and the doors will be opened.

6

Maybe you want to authorize the application...

7

...probably, a code will be generated.

8

You can exchange that code by a token! act quickly, as it expires!

9

http://localhost:3000/oauth/authorise?response_type=code&client_id=capi2231&redirect_uri=http://capituchi.com/auth/lepocamon/redirect