Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vedi/oauthifizer-dummy-example
It's example project for module `oauthifizer` (https://github.com/vedi/oauthifizer).
https://github.com/vedi/oauthifizer-dummy-example
Last synced: 3 days ago
JSON representation
It's example project for module `oauthifizer` (https://github.com/vedi/oauthifizer).
- Host: GitHub
- URL: https://github.com/vedi/oauthifizer-dummy-example
- Owner: vedi
- License: mit
- Created: 2014-08-23T05:05:21.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-08-23T05:44:37.000Z (over 10 years ago)
- Last Synced: 2024-11-11T05:41:51.367Z (2 months ago)
- Language: JavaScript
- Size: 145 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# OAuthifizer example
Welcome to OAuthifizer example
It's example project for module `oauthifizer` (https://github.com/vedi/oauthifizer).
It's an example of using dummyAuthDelegate.js. It allows you to be always successfully authenticated, and can be used for understanding how `oauthifizer` works.
## Getting started
### Installation
```bash
git clone https://github.com/vedi/oauthifizer-dummy-example.git
cd oauthifizer-dummy-example
npm install
```### Running
```bash
npm start
```It runs the server on port 3000.
### Testing
Open new Terminal window.
> I use `httpie` (https://github.com/jakubroztocil/httpie) as a command line tool to test the servers. You can use any, but all the examples are created with syntax of `httpie`. Anyway it's recognizable.
In order to get authenticated use the path `/oauth`.
```bash
http POST localhost:3000/oauth grant_type=password client_id=app client_secret=secret username=anylogin password=password
```In order to access to restricted resource try the path `/users`.
```bash
http localhost:3000/users Authorization:'Bearer xxx'
```## License
MIT License. Copyright (c) 2014 Fedor Shubin.