You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+12-12
Original file line number
Diff line number
Diff line change
@@ -3,11 +3,11 @@
3
3
A simple JWT middleware for Phalcon Micro to handle stateless authentication.
4
4
5
5
## Installation
6
-
```
6
+
```bash
7
7
composer require dmkit/phalcon-jwt-auth
8
8
```
9
9
or in your composer.json
10
-
```
10
+
```json
11
11
{
12
12
"require": {
13
13
"dmkit/phalcon-jwt-auth" : "dev-master"
@@ -16,7 +16,7 @@ or in your composer.json
16
16
17
17
```
18
18
then run
19
-
```
19
+
```bash
20
20
composer update
21
21
```
22
22
@@ -25,7 +25,7 @@ composer update
25
25
### Configuration - Loading the config service
26
26
27
27
in config.ini or in any config file
28
-
```
28
+
```ini
29
29
[jwtAuth]
30
30
31
31
; JWT Secret Key
@@ -54,7 +54,7 @@ ignoreUri[] = /auth/application
54
54
```
55
55
56
56
in bootstrap or index file
57
-
```
57
+
```php
58
58
use Phalcon\Mvc\Micro;
59
59
use Phalcon\Config\Adapter\Ini as ConfigIni;
60
60
use Phalcon\Di\FactoryDefault;
@@ -85,7 +85,7 @@ $app->handle();
85
85
86
86
### Configuration - Don't want to use a config file? then pass the config instead
87
87
in bootstrap or index file
88
-
```
88
+
```php
89
89
use Phalcon\Mvc\Micro;
90
90
use Phalcon\Config\Adapter\Ini as ConfigIni;
91
91
use Phalcon\Di\FactoryDefault;
@@ -131,7 +131,7 @@ or pass the token as a query string
131
131
### Callbacks
132
132
133
133
By default if the authentication fails, the middleware will stop the execution of routes and will immediately return a response of 401 Unauthorized. If you want to add your own handler:
0 commit comments