Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to pass username and password in url #10

Open
mushahidh opened this issue Aug 18, 2015 · 10 comments
Open

How to pass username and password in url #10

mushahidh opened this issue Aug 18, 2015 · 10 comments
Labels

Comments

@mushahidh
Copy link

Hi,
Whenever i tried to access api i get this response
{"name":"Not Found","message":"Page not found.","code":0,"status":404,"type":"yii\web\NotFoundHttpException"}

I want to know how to fully access an API by passing username and password in url?

Thanks in advance

@githubjeka
Copy link
Owner

Hi,
See #5 (comment)

@mushahidh
Copy link
Author

Thanks for your prompt response.
I got it working.
Just one more thing.
How to configure angular client ? See in the image. all the paths are not configured correctly? is there anything i am missing? Thanks in advance
angular

@githubjeka
Copy link
Owner

@mushahidh
Copy link
Author

App is getting data from your server . I have changed the URL in app.js from https://yii2-rest-githubjeka.c9.io/rest/web to http://localhost:8080/angular-yii2/rest/rest/web/ but still data is coming from your server instead of mine local server.

@githubjeka
Copy link
Owner

This can not be, maybe you forgot to save the file :)

@mushahidh
Copy link
Author

Sorry to bother you again. it worked when i deleted my cache. But now when i click on Post published tab it gives me an error of 401 unauthorized and redirect me to this url http://localhost:8080/#!/login which shows me wamp home screen. Is there a way to solve this issue? http://localhost:8080/angular-yii2/client-angular/login also giving me 404.

@githubjeka
Copy link
Owner

You should configure virtual host for rest and client app. All your troubles associated with subfolders.
To easy using set http://rest.local to rest/rest/web and http://client.local to client-angular a folder.

@mushahidh
Copy link
Author

@githubjeka I am really thankful to you the way you helped me :). Actually it's my first experience with yii2+rest+angular. So i found your work very much helpful. Don't mind but i will keep disturbing you if i am unable to solve some problem.

@githubjeka
Copy link
Owner

Ok, and better create new issue for your future problems

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants