Error: Class 'Request' not found in Laravel config\azure-oath - laravel

I am using Laravel-5.8 for a web application. In order to integrate Azure AD SSO, I installed this package in my application:
composer require metrogistics/laravel-azure-ad-oauth
When, I wanted to relaunch my application I got this error:
Class 'Request' not found
The error is found here:
config\azure-oath.php
How do I resolve this error?
Thank you

The issue has been solved by the link in #Sunil kumawat 's comment, just add it as an answer to make it easier for others to find here.
https://github.com/metrogistics/laravel-azure-ad-oauth/issues/1
I deleted that part of the code, now the code is like this: 'redirect' => '/ login / microsoft / callback', and it works for me.

Related

Did I solve my "Target class [mail.manager] does not exist." issue?

Just upgraded from Laravel 6 to 7, and had the error response above when submitting a contact form. I eventually found a solution that seems to work and I am submitting here to help out the next guy.
In the terminal run:
composer require illuminate/mail
Add the following to the top of the controller file (app/Http/Controllers/Main.php in my case):
use \Illuminate\Support\Facades\Mail;
Add this to bootstrap/app.php:
$app->register(Illuminate\Mail\MailServiceProvider::class);
Save and test, and it worked localhost.
If the above does not work for you, there are some other possible issues and solutions available at this link, where I must give credit to vipindasks.
https://laracasts.com/discuss/channels/lumen/lumen-52-mail-not-working
Since I am suppose to ask a question:
Do you see any problems with this solution even though the site and mailer is working now?
You are simply missing a backslash. This tells the autoloader that the file you are looking for is not in the namespace your controller resides in :
$app->register(\Illuminate\Mail\MailServiceProvider::class);
Run composer update hope this will help you

Class does not exist antonioribeiro/tracker

Hello guys I am using antonioribeiro/tracker from github and followed all the instructions everything went smooth but when I tried to access the stats panel it returns an error that
class admin does not exists.
In the tracker.php, I found the error is from this line 'authentication_ioc_binding' => ['auth','admin']
I tried creating admin class but it did not fix the issue. I was confused with the documentation of the package. The code that I followed is for multiple authentication driver. So I used the default setting authentication_ioc_binding => ['auth'] this solves the issue.

Laravel 5.2 view in register a provider

i have installed the chat package:
https://github.com/dazzz1er/confer
Unfortunately i get an error when i try to publish it. Here is the error:
[Symfony\Component\Debug\Exception\FatalErrorException]
Call to undefined method Illuminate\Support\Facades\View::composer()
Thanks !
As correctly pointed out by #curious_coder confer is not compatible with Laravel 5.2 yet. Please keep an on the open Laravel 5.2 issue on Github and/or ask the author of this package for updates.

Laravel 4, Composer and hybridauth - How to load additional providers

I'm using Laravel 4 and have loaded hybridauth via composer and got it working just fine with Facebook and Twitter. Now i'm trying to get it working with Steam, which is listed as an additional provider, however I keep getting the following error:
require_once(vendor/hybridauth/hybridauth/hybridauth/Hybrid/Providers/Steam.php) [function.require-once]: failed to open stream: No such file or directory
Clearly it's looking in the wrong place, the actual class resides in this location:
vendor/hybridauth/hybridauth/additional-providers/hybridauth-steam/Providers/Steam.php
There's very little documentation that I can find on this, my only guess is that the author of hybridauth only offered these additional providers as optional extras and expects you to move the location of the class to the proper place, however with composer this isn't the way to do things and will cause problems anytime I run composer update.
I can't find anyone having a similar problem via Google, which seems strange so i'm worried i'm missing obvious. Is there a way to use the additional providers, to have them autoload, while using hybridauth with Composer?
The only solution I can think to do is to manually include the correct file before it tries to autoload. I don't mind doing that, but i'm assuming there must be a proper way to do this otherwise using Composer with Hybridauth is fairly useless.
I had this problem with Instagram and was able to use the wrapper syntax, which is documented here http://hybridauth.sourceforge.net/userguide/tuts/specific-provider-wrapper.html
The code below got the Instagram adapter working for me.
"Instagram" => array (
"enabled" => true,
"keys" => array (
"id" => xxxx,
"secret" => xxxx,
),
"wrapper" => array(
'class'=>'Hybrid_Providers_Instagram',
'path' => $_SERVER['DOCUMENT_ROOT'].'/../vendor/hybridauth/hybridauth/additional-providers/hybridauth-instagram/Providers/Instagram.php'
)
),
If you read the source at hybridauth/Hybrid/Provider_Adapter.php line 69, you'll see it checks for this before doing require_once with the standard path.
I searched and searched for this as well. All I can think of is that it was made for use without frameworks, then was ported to be used with Composer, however the "additional providers" folder isn't loaded, or something. It kinda sucks.
I just copied the file into the other directory, and everything works now.
This maybe handy for you...
http://blog.elliothesp.co.uk/coding/laravel-4-and-hybrid-auth/
Part regarding this:
Copy the Steam.php file, located at:
laravel/vendor/hybridauth/hybridauth/additional-providers/hybridauth-steam/Providers/Steam.php
Over to:
laravel/vendor/hybridauth/hybridauth/hybridauth/Hybrid/Providers/
I've no idea why the library has them separated, doesn't make any sense to me.

Spring security login error

I just implemented a simple login functionality using spring it how ever worked with the eclipse in built browser but gives the following error in chrome and firefox.
HTTP Status 404 - /SpringLogin/welcome.jsp;jsessionid=8332D4F3D4709DCA37C87F30F1EA03D5
The requested resource (/SpringLogin/welcome.jsp;jsessionid=BEE789093FF79CB6B67F8DA368E8B3E4) is not available.
can you please tell me why it is happening?
PS: I have two projects SpringLogin and both of them had same project names and both had similar packages. Then neither of the projects worked properly and gave the above error. How ever after I created another project with a different name and using different package names, it worked like magic. I am guessing here that it may have been the problem. But what is the logical answer that'll explain what happened there?
you don't have being calling the correct URL
it seems that the context /SpringLogin/ does not exists anymore.
Try /welcome.jsp or if you changed the name of application - try /newappname/welcome.jsp

Resources