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
'modelSearchField' => 'email', // field in User model for searching
134
+
'keyCloakSearchField' => 'id',
135
+
'userCreator' => App\KeyCloak\UserCreator::class, // class mast implement SlowCheetah\KeycloakWebGuard\Contracts\CreateUserInterface
136
+
'syncUser' => App\KeyCloak\SyncUser::class, // class mast implement SlowCheetah\KeycloakWebGuard\Contracts\SyncUserInterface
131
137
],
132
138
133
139
// ...
134
140
]
135
141
```
136
142
137
-
**Note:** if you want use another User Model, check the FAQ *How to implement my Model?*.
138
-
139
143
## API
140
144
141
145
We implement the `Illuminate\Contracts\Auth\Guard`. So, all Laravel default methods will be available.
@@ -199,16 +203,6 @@ You can extend it and register your own middleware on Kernel.php or just use `Au
199
203
200
204
## FAQ
201
205
202
-
### How to implement my Model?
203
-
204
-
We registered a new user provider that you configured on `config/auth.php` called "keycloak-users".
205
-
206
-
In this same configuration you setted the model. So you can register your own model extending `Vizir\KeycloakWebGuard\Models\KeycloakUser` class and changing this configuration.
207
-
208
-
You can implement your own [User Provider](https://laravel.com/docs/5.8/authentication#adding-custom-user-providers): just remember to implement the `retrieveByCredentials` method receiving the Keycloak Profile information to retrieve a instance of model.
209
-
210
-
Eloquent/Database User Provider should work well as they will parse the Keycloak Profile and make a "where" to your database. So your user data must match with Keycloak Profile.
211
-
212
206
### I cannot find my login form.
213
207
214
208
We register a `login` route to redirect to Keycloak Server. After login we'll receive and proccess the token to authenticate your user.
0 commit comments