Skip to content
This repository was archived by the owner on Jul 24, 2023. It is now read-only.

Commit 0699cba

Browse files
committed
Add method to handle an SSO authenticated user.
1 parent a8bdb4e commit 0699cba

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

src/Middleware/WindowsAuthenticate.php

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,9 @@ public function handle(Request $request, Closure $next)
6969
$model = $this->getModelFromAdldap($user, str_random());
7070

7171
if ($model instanceof Model) {
72-
// Double check user instance before logging them in.
7372
$this->auth->login($model);
73+
74+
$this->handleAuthenticatedUser($model);
7475
}
7576
}
7677
}
@@ -106,6 +107,20 @@ public function createModel()
106107
return new $model();
107108
}
108109

110+
/**
111+
* Handle the authenticated user model.
112+
*
113+
* This method exists to be overridden.
114+
*
115+
* @param Model $user
116+
*
117+
* @return void
118+
*/
119+
protected function handleAuthenticatedUser(Model $user)
120+
{
121+
//
122+
}
123+
109124
/**
110125
* Returns the windows authentication attribute.
111126
*

0 commit comments

Comments
 (0)