MongoDB Authentication презентация

Содержание

SQL vs NoSQL MongoDB Mongoose Authentication Passport.js AGENDA OF THE LECTURE

Слайд 1MongoDB
Authentication
Vadym Makhonin
March 2018


Слайд 2 SQL vs NoSQL
MongoDB
Mongoose
Authentication
Passport.js

AGENDA OF THE LECTURE


Слайд 3NOSQL
SQL VS


Слайд 4RELATIONAL DATABASE PROBLEMS
Scalability
Flexibility
NoSQL databases solve these problems


Слайд 5NOSQL DATABASE PROBLEMS
No join
No data integrity
No transaction


Слайд 6WHERE SQL IS IDEAL
logical related discrete data requirements which can

be identified up-front
data integrity is essential
standards-based proven technology with good developer experience and support

Слайд 7WHERE NOSQL IS IDEAL
unrelated, indeterminate or evolving data requirements

simpler or looser project objectives, able to start coding immediately
speed and scalability is imperative

Слайд 8MONGODB


Слайд 9MONGODB
MongoDB is an open source, document-oriented database designed with both scalability

and developer agility in mind.

Слайд 10MONGODB COMPRASION TO SQL




Слайд 11MOGNODB CLI
DEMO


Слайд 12MONGODB CLI
show dbs
use
show collections
help / db.help()

/db.collection.help()

Слайд 13MONGODB CLI CRUD
db.collection.insert(document)
db.collection.find(query, projection)
db.collection.update(query, update, options)
db.collection.remove(query, options)


Слайд 14MONGODB DRIVERS
An application communicates with MongoDB by way of a client

library, called a driver, that handles all interaction with the database in a language appropriate to the application.

npm install mongodb


Слайд 15MOGNODB NATIVE DRIVER
DEMO


Слайд 16ORM, ODM
ORM (Object-Relational Mapping), ODM (Object Document Mapper) - programming technique

for converting data between incompatible type systems in databases and object-oriented programming languages. This creates, in effect, a "virtual object database" that can be used from within the programming language.

Most popular ORM in Node.js – Sequelize.

ORM – for relational databases, ODM – for NoSQL databases.


Слайд 17MONGOOSE


Слайд 18MONGOOSE
Mongoose provides a straight-forward, schema-based solution to model your application data.

It includes built-in type casting, validation, query building, business logic hooks and more, out of the box.

Слайд 19MONGOOSE
DEMO


Слайд 20MONGOOSE API
mongoose.connect(url, options)
mongoose.Promise
mongoose.Schema
mongoose.model(name, schema)
mongoose.plugin(func, options)


Слайд 21SCHEMA API
const schema = new Schema(definition, options)
schema.methods
schema.statics
schema.virtual(name, options)

schema.pre/post(method, callback)
schema.plugin(func, options)

Слайд 22SCHEMA DEFINITION
type
required
default
unique
validate
lowercase
uppercase
trim
match

enum

min
max

String

Number/Date


Слайд 23AUTHENTICATION


Слайд 24AUTHENTICATION
Authentication - is the process of actually confirming truth identity.

Authorization - is the function of specifying access rights to resources related to information security and computer security in general and to access control in particular.

Слайд 25 HTTP
Forms
One-Time Password(two-factor authentication)
API key
Token-based
AUTHENTICATION METHODS


Слайд 26 User Requests Access with Username / Password
Application validates credentials

Application provides a signed token to the client
Client stores that token and sends it along with every request
Server verifies token and responds with data

HOW TOKEN BASED WORKS


Слайд 27 SWT
JWT
SAML
TOKEN-BASED AUTHENTICATION
OAuth
OpenID Connect
SAML
WS-Federation
Token formats:
Standards:


Слайд 28PASSPORT.JS


Слайд 29PASSPORT
Passport is Express-compatible authentication middleware for Node.js.
Passport's sole purpose is to

authenticate requests, which it does through an extensible set of plugins known as strategies. The API is simple: you provide Passport a request to authenticate, and Passport provides hooks for controlling what occurs when authentication succeeds or fails.

Слайд 30PASSPORT MAIN CONCEPTS
Strategies
Sessions
Middleware


Слайд 31PASSPORT API
passport.initialize / session()
passport.use()
passport.serializeUser / deserializeUser()
passport.authenticate()
req.login

/ logout()

Слайд 32PASSPORT.JS
DEMO


Слайд 33THANK YOU!


Обратная связь

Если не удалось найти и скачать презентацию, Вы можете заказать его на нашем сайте. Мы постараемся найти нужный Вам материал и отправим по электронной почте. Не стесняйтесь обращаться к нам, если у вас возникли вопросы или пожелания:

Email: Нажмите что бы посмотреть 

Что такое ThePresentation.ru?

Это сайт презентаций, докладов, проектов, шаблонов в формате PowerPoint. Мы помогаем школьникам, студентам, учителям, преподавателям хранить и обмениваться учебными материалами с другими пользователями.


Для правообладателей

Яндекс.Метрика