0
0
Fork 0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-05-21 15:36:58 +00:00

Merge branch 'openid' of https://github.com/jasperweyne/BookStack into jasperweyne-openid

This commit is contained in:
Dan Brown 2021-10-06 13:17:30 +01:00
commit 193d7fb3fe
No known key found for this signature in database
GPG key ID: 46D9F943C24A2EF9
25 changed files with 940 additions and 34 deletions
app/Http/Controllers

View file

@ -84,7 +84,7 @@ class UserController extends Controller
if ($authMethod === 'standard' && !$sendInvite) {
$validationRules['password'] = 'required|min:6';
$validationRules['password-confirm'] = 'required|same:password';
} elseif ($authMethod === 'ldap' || $authMethod === 'saml2') {
} elseif ($authMethod === 'ldap' || $authMethod === 'saml2' || $authMethod === 'openid') {
$validationRules['external_auth_id'] = 'required';
}
$this->validate($request, $validationRules);
@ -93,7 +93,7 @@ class UserController extends Controller
if ($authMethod === 'standard') {
$user->password = bcrypt($request->get('password', Str::random(32)));
} elseif ($authMethod === 'ldap' || $authMethod === 'saml2') {
} elseif ($authMethod === 'ldap' || $authMethod === 'saml2' || $authMethod === 'openid') {
$user->external_auth_id = $request->get('external_auth_id');
}