mirror of
https://github.com/namibia/awesome-cheatsheets.git
synced 2024-12-18 00:24:07 +00:00
Update README.md
This commit is contained in:
parent
945738c992
commit
dca4f0d99a
@ -7,14 +7,14 @@
|
||||
> ❤️ **If you like this repository, [you can click here to tweet it and make it spread](https://ctt.ec/PHba4).**
|
||||
|
||||
|
||||
## Why Awesome-Cheatsheets?
|
||||
## 🎩 Why Awesome-Cheatsheets?
|
||||
|
||||
I always make a cheatsheet when I want to improve my skills on a programming language, a framework or a development tool. [I started doing these kind of things a long time ago on Gist](https://gist.github.com/LeCoupa) To better keep track of the history and to let people contribute to them, I reorganized everything into this single repository. Most of the content is coming from official documentations and some books I have read.
|
||||
|
||||
Feel free to browse each cheatsheet to learn new things and to keep them at hand when you forgot about one command. They have been designed to provide a quick way to assess your knowledge and to save you time.
|
||||
|
||||
|
||||
## How to Contribute?
|
||||
## 🙌🏼 How to Contribute?
|
||||
|
||||
You are more than welcome to contribute and build your own cheatsheet for your favorite programming language, framework or development tool. Just submit changes via pull request and I will review them before merging.
|
||||
|
||||
|
@ -298,6 +298,33 @@ npm install @feathersjs/authentication-oauth1 --save
|
||||
npm install @feathersjs/authentication-oauth2 --save
|
||||
```
|
||||
|
||||
app.configure(auth(options)) // configure the authentication plugin with the given options
|
||||
|
||||
options = {
|
||||
path: '/authentication', // the authentication service path
|
||||
header: 'Authorization', // the header to use when using JWT auth
|
||||
entity: 'user', // the entity that will be added to the request, socket, and context.params. (ie. req.user, socket.user, context.params.user)
|
||||
service: 'users', // the service to look up the entity
|
||||
passReqToCallback: true, // whether the request object should be passed to the strategies `verify` function
|
||||
session: false, // whether to use sessions
|
||||
cookie: {
|
||||
enabled: false, // whether cookie creation is enabled
|
||||
name: 'feathers-jwt', // the cookie name
|
||||
httpOnly: false, // when enabled, prevents the client from reading the cookie.
|
||||
secure: true // whether cookies should only be available over HTTPS
|
||||
},
|
||||
jwt: {
|
||||
header: { typ: 'access' }, // by default is an access token but can be any type
|
||||
audience: 'https://yourdomain.com', // The resource server where the token is processed
|
||||
subject: 'anonymous', // Typically the entity id associated with the JWT
|
||||
issuer: 'feathers', // The issuing server, application or resource
|
||||
algorithm: 'HS256', // the algorithm to use
|
||||
expiresIn: '1d' // the access token expiry
|
||||
}
|
||||
}
|
||||
|
||||
app.service('authentication') //
|
||||
|
||||
|
||||
/* *******************************************************************************************
|
||||
* 5. DATABASE: Feathers common database adapter API and querying mechanism.
|
||||
|
Loading…
Reference in New Issue
Block a user