src/Http/Controllers/RetrievesAuthRequestFromSession.php
protected function getAuthRequestFromSession(Request $request)
    {
        return tap($request->session()->get('authRequest'), function ($authRequest) use ($request) {
            if (! $authRequest) {
                throw new Exception('Authorization request was not present in the session.');
            }

            $authRequest->setUser(new User($request->user()->getKey()));

            $authRequest->setAuthorizationApproved(true);
        });
    }
protected function getAuthRequestFromSession(Request $request)
    {
        return tap($request->session()->get('authRequest'), function ($authRequest) use ($request) {
            if (! $authRequest) {
                throw new Exception('Authorization request was not present in the session.');
            }

            $authRequest->setUser(new User($request->user()->getKey()));

            $authRequest->setAuthorizationApproved(true);
        });
    }
protected function getAuthRequestFromSession ( Request $ request ) { return tap ( $ request -> session ( ) -> get ( 'authRequest' ) , function ( $ authRequest ) use ( $ request ) { if ( ! $ authRequest ) { throw new Exception ( 'Authorization request was not present in the session.' ) ; } $ authRequest -> setUser ( new User ( $ request -> user ( ) -> getKey ( ) ) ) ; $ authRequest -> setAuthorizationApproved ( true ) ; } ) ; }
Get the authorization request from the session.

@param  \Illuminate\Http\Request  $request
@return \League\OAuth2\Server\RequestTypes\AuthorizationRequest
@throws \Exception
Get the authorization request from the session .