MEAN stack authentication - angularjs

I am new to the MEAN stack and am struggling to find any appropriate literature, or helpful tutorials for my problem.
I am developing a blog site, which will also have an admin content management system for adding new blog articles. I want to be able to login to the system and access restricted content. The content on specific URL's can only be viewed if the user is logged in and so on...
I am struggling to find a good authentication tutorial that goes through the process step by step. As I am new too the syntax and semantics of AngularJS and NodeJS, I need something that will break down each process and define the methods.
Would anyone be able to point me in the right direction for my problem?

To be honest I have recently started myself.
Take a look at meanjs.org or even masteringmean.com
Perhaps this video could help you?
https://masteringmean.com/lessons/601-Angular-e2e-Protractor-Testing-Interacting-with-Thirdparty-Sites
I remember having timing issues at one point, which is actually mentioned here.
I do agree as well that perhaps its useful to look at understanding middleware and how to respond to requests with the connect framework.

Here is a simple MEAN stack implementation (but using a DEPLOYD nodejs framework) This you can use for rapid learning of MEAN stack. (Disclosure: I'm a contributor to this MarsCMS)
https://github.com/moorthi07/MarsCMS/

#user37... Checkout satellizer, https://github.com/sahat/satellizer.
It's a complete token based Oauth with a bonus for social logins.
Reply back here if you have any Qs.

Related

How to discourage scraping on a Drupal website?

I have a Drupal website that has a ton of data on it. However, people can quite easily scrape the site, due to the fact that Drupal class and IDs are pretty consistent.
Is there any way to "scramble" the code to make it harder to use something like PHP Simple HTML Dom Parser to scrape the site?
Are there other techniques that could make scraping the site a little harder?
Am I fighting a lost cause?
I am not sure if "scraping" is the official term, but I am referring to the process by which people write a script that "crawls" a website and parses sections of it in order to extract data and store it in their own database.
First I'd recommend you to google over web scraping anti-scrape. There you'll find some tools for fighting web scrapig.
As for the Drupal there should be some anti-scrape plugins avail (google over).
You might be interesting my categorized layout of anti-scrape techniques answer. It's for techy as well as non-tech users.
I am not sure but I think that it is quite easy to crawl a website where all contents are public, no matter if the IDs are sequential or not. You should take into account that if a human can read your Drupal site, a script also does.
Depending on your site's nature if you don't want your content to be indexed by others, you should consider setting registered-user access. Otherwise, I think you are fighting a lost cause.

Google Cloud Endpoints stability?

I am using this link to build a simple chat application using GCM, and I found this great feature "Google Cloud Endpoints" which makes things easier. But I am afraid to depend on it as I noticed it is still experimental. Can I trust it or should I use Java Servlets instead?
It is true that the tag 'experimental' is a bit scary. If you are concerned, you could consider holding back a bit until Google IO 2013, which is the middle of May. They often make announcement and introduce new technologies there.
They first announced endpoints at last years' Google IO (in July) and if there any significant changes pending for endoints they would likely announce them at this years'.
If you do start using Endpoints, just for Android, and w/o user authentication, I don't think it would be too hard to revert to using a Servlet instead, if you had to (i.e. due to a change in terms that was off-putting). The user authentication stuff would be harder to replace IMO.
As far as I have used Google Cloud Endpoints they work perfectly. Furthermore many interesting features are already implemented, such as integration with Google Eclipse Plugin and testing through the Google APIs Explorer, even in localhost, using the Development Server.
I understand they're still experimental maybe because they're just a new technology not really thoroughly tested yet and are subject to updates. Anyway I've not found significant bugs so far and you should be able to reuse your endpoints with the sucesive versions that will exist. It doesn't seem to be something that will dissapear in the near future...
This is an older question, but for further references I want to say that my short experience was not so pleasant.
I tried "Mobile Backend App". In the beginning, everything worked fine, but after a few days (without changing anything) I received:
GoogleJsonResponseException 404 Not Found
I sow other posts on stackoverflow and manage to solve it by creating another project. I changed the code and it still worked. But again I had problems I played a bit with the 2 projects, I redeployed and changed the settings (tips found on other posts) and it worked. Now it is no longer working, no matter what I do.
I hope that the problem is specific to this project, but nevertheless it is frustrating.

cakephp website with phpBB or simple machines forums possible?

I have a website made with CakePHP 1.3.7. This website has it's own login system. Now the client wants to include a forum in the website.
I've been looking at different free solutions and phpBB and SMF seem to be what I'm looking for. The only thing I'm not so sure is about integrating those forums with the login system that I already have.
I mean, if a user has already an account for the website (or creates a new one), he/she should be able to use that same account (username) in the forum section.
Is that possible? Any clue pointing me in the right direction would be much appreciated! I mentioned both forum solutions in case one is easier to integrate than the other one, that would be also good to know (or if there's any other better option).
Thanks so much in advance!
It's possible to use both but I personally prefer SMF. You have to configure CakePHP's session component to use database sessions and create a model that will use the forums session table.
You can decide if you want or need a separate users table besides the forums users table (or its called members, don't know right now).
The "hard" part is to make the cake app read/write the sessions and cookies in the same fashion SMF does to allow a smooth transition from the cake app to the forum and backwards.
Technically you can use both forums and archive your goal with both, it's just a matter of getting the frameworks components utilized right.
I ended up using: this
It has all that I needed and integrates perfectly into Cake :)

custom authentication and authorization on GAE

im trying to understand how to implement my own authentication and authorization machinery for my GAE app. does anyone already implemented something like that and maybe can give me some advice?
what i need is grant access on certain sections to specific users and restrict the access to others.
i looked at repoze.who and reapoze.what but its not really clear to me how to use them on app engine.
thank you
Maybe taking a look at tipfy.ext.auth (doc, wiki, source code,) and tipfy.ext.acl (doc, wiki, source code) would provide you with a little kickstart. Those are extensions built on top of tipfy, a open source lightweight python-based framework made for GAE.
In order to get a better understanding of their usage and implementation, make sure to peek at the source code of each and the associated testsuites.
From your question it is not clear if you are using java or python. I have done my custom user management with authentication/authorization using spring-security in java GAE. Things work fine.
Here and here are some more info/links from me.

Building your own google wave federation

I'm looking to learn about running my own google wave server. There are videos on how to set it up and get it in the command line, but my question is.. okay - where do you go from there? How do you take this service that is running in the command line and apply it to the web? Is there documentation on doing just that?
I have looked at the embedded API, but I do not think that's what I want. I'd also love for the frontend to be built in PHP - would anyone have any idea how to communicate PHP to Wave?
Thanks,
Matt Mueller
Okay ya'll. I emailed a few of the key Google Wave developers and surprisingly one of them responded! Here's what he said:
"Thanks for contacting me.
Unfortunately there's still a big gap
between the code we have opened so far
and building a UI. The conversation
model describes how to interpret a
wave as a conversation but we have yet
to open up the code that does that (we
will though!). So it would be a big
challenge at the moment."
So we can only wait I suppose!

Resources