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
+39-17Lines changed: 39 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@
6
6
| 5.5 | ^0.7.3 |
7
7
| 5.6 | ^0.7.3 |
8
8
9
-
`univicosa/laravel-openid-client` is a Laravel package which created to integrate the Oauth server to ours Laravel project's that require authentication.
9
+
`univicosa/laravel-openid-client` is a Laravel package which created to integrate the Oauth server to ours Laravel project's that requires authentication.
10
10
11
11
## Install
12
12
@@ -16,13 +16,13 @@ Installation using composer:
16
16
composer require univicosa/laravel-openid-client
17
17
```
18
18
19
-
And add the service provider in `config/app.php`:
19
+
For laravel versions < 5.5 add the service provider in `config/app.php`:
**PS:** Don't forget change the session time to (minutes) you want.
41
+
**PS:** Don't forget change the `SESSION_LIFETIME` in the .env file to the time in minutes you want to keep the logged session.
42
42
43
-
## Changing the _Guard_
43
+
## For change the _Guard_
44
44
45
45
change the file `config\auth.php` to:
46
46
47
47
```
48
-
'guards' => [
49
-
'web' => [
50
-
'driver' => 'openid',
51
-
'provider' => NULL,
52
-
],
53
-
/*
54
-
* ...
55
-
*/
56
-
]
48
+
'guards' => [
49
+
'web' => [
50
+
'driver' => 'openid',
51
+
'provider' => NULL,
52
+
],
53
+
/*
54
+
* ...
55
+
*/
56
+
]
57
57
```
58
58
59
59
## Oauth `public key`
60
60
61
61
Copy the `oauth public key` to `storage` folder of your project.
62
62
63
-
## Facades
63
+
## _Facades_
64
64
65
-
The client methods are available under the facade OpenId
65
+
The client methods are available under the facade OpenId.
66
+
67
+
The authentication methods like the verifier `\Auth::check()` are available under the Facade `\Illuminate\Support\Facades\Auth`;
68
+
69
+
## _View components_
70
+
71
+
`@openidComponents`:
72
+
73
+
For load the user's logged menu, the fast access with the users permissions and render the Login Button in case you have not authenticated page, just call the Blade directive under your header component.
74
+
75
+
`@login(route.name)`:
76
+
77
+
The login directive will call the route you
78
+
79
+
## _Redirecting routes_
80
+
81
+
The dynamic route from Oauth system can redirect the user back to the source using the `?continue` url parameter.
82
+
83
+
The following example will be redirect back to the source after the user executes the actions needed in the Oauth Service page:
0 commit comments