-
-
Notifications
You must be signed in to change notification settings - Fork 751
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename repository and use npm scope (#31)
- Loading branch information
Showing
9 changed files
with
568 additions
and
532 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,25 @@ | ||
# feathers-authentication-oauth1 | ||
# @feathersjs/authentication-oauth1 | ||
|
||
[![Greenkeeper badge](https://badges.greenkeeper.io/feathersjs/feathers-authentication-oauth1.svg)](https://greenkeeper.io/) | ||
[![Greenkeeper badge](https://badges.greenkeeper.io/feathersjs/authentication-oauth1.svg)](https://greenkeeper.io/) | ||
|
||
[![Build Status](https://travis-ci.org/feathersjs/feathers-authentication-oauth1.png?branch=master)](https://travis-ci.org/feathersjs/feathers-authentication-oauth1) | ||
[![Code Climate](https://codeclimate.com/github/feathersjs/feathers-authentication-oauth1/badges/gpa.svg)](https://codeclimate.com/github/feathersjs/feathers-authentication-oauth1) | ||
[![Test Coverage](https://codeclimate.com/github/feathersjs/feathers-authentication-oauth1/badges/coverage.svg)](https://codeclimate.com/github/feathersjs/feathers-authentication-oauth1/coverage) | ||
[![Dependency Status](https://img.shields.io/david/feathersjs/feathers-authentication-oauth1.svg?style=flat-square)](https://david-dm.org/feathersjs/feathers-authentication-oauth1) | ||
[![Download Status](https://img.shields.io/npm/dm/feathers-authentication-oauth1.svg?style=flat-square)](https://www.npmjs.com/package/feathers-authentication-oauth1) | ||
[![Slack Status](http://slack.feathersjs.com/badge.svg)](http://slack.feathersjs.com) | ||
[![Build Status](https://travis-ci.org/feathersjs/authentication-oauth1.png?branch=master)](https://travis-ci.org/feathersjs/authentication-oauth1) | ||
[![Test Coverage](https://api.codeclimate.com/v1/badges/c8bd6a04ca7085e78e5f/test_coverage)](https://codeclimate.com/github/feathersjs/authentication-oauth1/test_coverage) | ||
[![Dependency Status](https://img.shields.io/david/feathersjs/authentication-oauth1.svg?style=flat-square)](https://david-dm.org/feathersjs/authentication-oauth1) | ||
[![Download Status](https://img.shields.io/npm/dm/@feathersjs/authentication-oauth1.svg?style=flat-square)](https://www.npmjs.com/package/@feathersjs/authentication-oauth1) | ||
|
||
> A Feathers OAuth1 authentication strategy | ||
## Installation | ||
|
||
``` | ||
npm install feathers-authentication-oauth1 --save | ||
npm install @feathersjs/authentication-oauth1 --save | ||
``` | ||
|
||
**Note:** This is only compatibile with `[email protected]` and above. | ||
|
||
## Documentation | ||
|
||
Please refer to the [feathers-authentication-oauth1 documentation](http://docs.feathersjs.com/) for more details. | ||
Please refer to the [@feathersjs/authentication-oauth1 documentation](http://docs.feathersjs.com/) for more details. | ||
|
||
## Supported Strategies | ||
|
||
|
@@ -36,7 +34,7 @@ This module contains 2 core pieces: | |
|
||
### Main Initialization | ||
|
||
In most cases initializing the `feathers-authentication-oauth1` module is as simple as doing this: | ||
In most cases initializing the `@feathersjs/authentication-oauth1` module is as simple as doing this: | ||
|
||
```js | ||
const session = require('express-session'); | ||
|
@@ -94,7 +92,7 @@ The `Verifier` class can be extended so that you customize it's behavior without | |
An example of customizing the Verifier: | ||
```js | ||
import oauth1, { Verifier } from 'feathers-authentication-oauth1'; | ||
import oauth1, { Verifier } from '@feathersjs/authentication-oauth1'; | ||
|
||
class CustomVerifier extends Verifier { | ||
// The verify function has the exact same inputs and | ||
|
@@ -167,7 +165,7 @@ app.service('users').hooks({ | |
## Complete Example | ||
Here's a basic example of a Feathers server that uses `feathers-authentication-oauth1`. You can see a fully working example in the [example/](./example/) directory. | ||
Here's a basic example of a Feathers server that uses `@feathersjs/authentication-oauth1`. You can see a fully working example in the [example/](./example/) directory. | ||
**Note:** You must setup some session middleware. OAuth1 strategies rely on sessions in order to authenticate. | ||
|
@@ -181,7 +179,7 @@ const session = require('express-session'); | |
const TwitterStrategy = require('passport-twitter').Strategy; | ||
const errorHandler = require('feathers-errors/handler'); | ||
const auth = require('feathers-authentication'); | ||
const oauth1 = require('feathers-authentication-oauth1'); | ||
const oauth1 = require('@feathersjs/authentication-oauth1'); | ||
|
||
// Initialize the application | ||
const app = feathers() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.