Skip to content

Commit bba0d03

Browse files
committed
Laravel rest api with passport
1 parent 269d80a commit bba0d03

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,21 @@ We will use the in built functionality of laravel for authentication which call
55

66
Laravel provides more security for APIs. So, its good to work on API with Laravel.
77

8-
In below example, we will create CRUD operation for Blog using passport authentication.
8+
#### **What is REST API?**
9+
Rest API (Representational State Transfer) api's are web standards base architecture and uses HTTP Protocol for exchanging data between applications or systems.
10+
In RESTFUL web service HTTP methods like GET, POST, PUT and DELETE can be used to perform CRUD operations.
11+
12+
#### **What is Passport?**
13+
Laravel makes API authentication a breeze using Laravel Passport. APIs typically use tokens to authenticate users and do not maintain session state between requests.
14+
you can use passport for user authentication for api's.
15+
16+
#### **Why should we use Passport?**
17+
Passport provides a full OAuth2 server implementation for your Laravel application in a matter of minutes.
18+
It was built to make it easy to apply authentication over an API for laravel based web applications.
19+
The passport package will register its own database migrations. This command will create the encryption keys needed to generate secure access tokens.
20+
21+
#### **How to implement Passport in REST API?**
22+
In below example, we will create CRUD operation for Blog's API using passport authentication.
923
So, let's start.
1024

1125
**1) Create laravel project.**

0 commit comments

Comments
 (0)