Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Route::get('/', array('before' => '', function () {
- $broker = new SsoBroker();
- try {
- $broker->attach(true);
- $ssoUserManager = App::make(SsoUserManager::class);
- if ($user = $broker->getUserInfo()) {
- if (
- $ssoUserManager->isSsoUserImported($user) &&
- !$ssoUserManager->isSsoUserPublic($user) &&
- !Session::get('authenticating_as_user', false)
- ) {
- $ssoUserManager->loginSsoUser($user);
- }
- } else {
- Auth::logout();
- }
- } catch (\Exception $e) {
- Log::error($e->getMessage());
- }
- return View::make('home');
- }));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement