I would like to create an AngularJS application, that will communicate with backend of ZF2.
How can I make user's authentication? Please show me an easy example.
Thanks
Take a look at https://github.com/angular-app/angular-app - sample app.
There is a good security model in it.
Related
I have been searching for the best way to build an application using Angular 4 (client application running over apache2), Spring Boot (Rest Controller) and Social and Local login.
I am kinda new to all of this, and I've be looking around for about one month and still have not a good idea how to implement that! Couldnt find a good tutorial for the tecnologies mentioned above...
I need to be able to let the user login via system's own login and social login like facebook and google. Could someone please point at the right direction?
I am not sure if that I am on the right track... I thought that would be easy, but I feel very confuse and dont see how to integrate the response from spring with my angular application. And the login with social networks will not be direct with the angular application. The user will authenticate with facebook, for example, and when facebook redirect to spring, Ill retrieve the user associated to that social networks account and return that to my angular application. In the angular 4 application, Ill should be possible to invite friends and use some other social networks related features.
Here are some of the tutorials i've read:
http://www.baeldung.com/angular-4-upgrade-for-spring-security-oauth/
https://spring.io/guides/tutorials/spring-boot-oauth2/#_social_login_click
Can someone help me, pointing to the right direction, or placing a good tutorial or anything that would help?
I ended up by just using an angular module called ng-social-login. At the backend, I called 'https://graph.facebook.com/me' passing the token that came from frontend.
Thats all. Using spring social wasnt really a good idea at all
I am not sure if you can use spring social with Angular4 as front end. you might want to explore direct call from backend server to facebook graph API with tokens.
Easy way is to use Angular4 and Javascript SDK provided by facebook, G+, twitter.
Can you please suggest me best way to implement restful web services for user actions, I was looking into Joomla format=json things. I want core Joomla way :)
Have you tried looking into this service: https://techjoomla.com/rest-api-for-joomla
I've done all the necessary pages etc for my app now. It uses JSON parsers to retrieve information.
I'm now stuck on the login of the app as users will need to login to use the app. How do I need to approach this and are there any tutorials that demonstrates a simple login and pushes into the main app?
Thanks.
ASIHttpRequest might be very useful for you.
I didn't do it myself, but I think you could use Web View at start to retrieve login, password and then send it to your server to verify. You do it the same way as in usual browser. Or you can use usual view and then send info to server using GET-POST methods of HTTP.
1) Is it true that if you would like to have your custom dialogues to enter twitter user details that you cannot use OAuth to do that?
2) I looked at MGTwitterEngine and now I'm wondering whether it is really necessary to have more than 20 classes just to send a status update.
3) I used to use Basic Auth which worked just fine. It was very little code. Is there a way to modify that code so that it just works again?
Many thanks for your help.
You'll need to apply for xAuth from Twitter with a decent enough reason for them to allow you to use it. That will allow you to take the user's username & password using your own UI and get a token that way instead of going the web-route and directing them to a web auth page.
You'll most probably need to re-write a bunch of your basic auth methods to include all the OAuth signatures and headers into your requests. It'll be nice if they make the switch to OAuth 2 soon, it's much much easier.
I've written my own Twitter engine that uses XAuth and it's relatively simple (apart from the OAuth 1 garbage!). However it'll probably be best to use MGTwitterEngine if you're going the normal OAuth route. I'm not familiar with it but I hear good things. It depends on how you're going to use the API. Writing a simple wrapper probably won't be to hard if you're just interested in calling a few methods. It's just the OAuth 1 stuff that can get complicated; however Twitter's documentation on that is very good indeed.
If you only need to post to twitter, take a look at getsharekit.org it will save you a lot of the hassle with the integration
As for xAuth or oAuth if your application UI is heavily customised it can be well worthwhile applying for xAuth ,as your users all of a sudden will not come across twitters login pages, which are unlikely to be in keeping with the rest of your applications UI. However if your application is mainly a utility application, you will most likely be fine with the oAuth method which is easier as you do not need to apply to twitter for them to enable it
I want to configure a simple webapplication to support an iphone app to connect with it in RESTFUL ways. Initially have a user login session enabled from the iphone to the web app. I'd like the iphone app to send a NSURL call to the webapp, with user and password and have the webapp respond if the suer exists or not. Pretty simple. And I want to do it with web2py. Is this possible? Any clues?
I think you should post it to web2py group on google groups.
web2py#googlegroups.com
I know this question is a bit old now, but Massimo recently posted a video demonstrating a new experimental RESTful API for web2py. See also the Google groups posting "video about new RESTful APIs" .