Hi i am new to ZF2 and i am trying to understand the main concepts by creating an extended application to learn all about ZF2 and test my knowledge.
Please forgive me if my questions sound stupid or if i didnt get some things along the way when using things, i try to learn while i go.
At this point i want to integrate Authentication and ACL to my project and i need some questions answered for my general understanding of how this process works and how i can use it.
I already integrated a Login Form so i can Authenticate, and it is possible for me to do so, a PHP Session Cookie is created and i can identify a user through hasIdentity() in the AuthService.
As i am about to create ACL, of which i read the documentation and think i understood it, how am i able to check on every page request of my application if a user has access to certain pages/controllers etc.
From what i read and think it must be in the bootstrap of the module, so that on every page load the user is identified and ACL is checked for access.
if the user has the right he is granted access and requested page i loaded but if he doesnt have access he gets redirected to any other page (index/index or error page etc.)
But so far i couldnt find any useful tutorial or really good advice on how to create a bootstrap for my module and how to realise that pre-load access check.
are there any useful articles (with code pls for better understanding) or tutorials on how to make auth acl and module bootstrap work and work together?
Are there any other things that i must take care of when trying to get my user system to work?
thanks in advance for any advice!
happy new year btw :)
Ive been working on the same problem recently and i came across a tutorial that can be modified to bootstrap some auth checks.
http://akrabat.com/zend-framework-2/simple-logging-of-zf2-exceptions/
I hope this helps :)
Related
generic question from someone trying to learn the Rails framework. I have a web app that I need to implement a login system into (not authentication, just login). I have multiple pages within my app, each with separate tables and stuff that needs to be saved to each particular user. I know I need to use the sessions resource somehow, but I'm not entirely clear on what I need to add. I know it's not a very specific question, so any info at all on how to get started would be greatly appreciated.
I´m mainly a coder but for a project I've got to do some more with RoR. I've been working with RoR for some projects but mainly on the front-end side. I understand it a basic level, but for this project I have to dive in the deep.
What I want to create is an app where a user can search for movies and add them to their account. I want to use theMovieDb api for this, but I can't find a screencast or tutorial that shows the beginning of how to connect your app with someone else's api. So I was hoping the StackOverflow people could point me in the right direction.
This is kind of a big question, but it seems you have two parts here. First is how to make a request from inside your application. The second is how to interact with an API.
I've set up somethings similar where I had to make API requests from inside a controller using Net::HTTP. The answer to this question helped a lot. From inside the controller, I processed the request response as needed, i.e. putting it into a relational database, or displaying it to the user.
How make a HTTP request using Ruby on Rails?
The second part about interacting with the database. The movie database API is described at
http://docs.themoviedb.apiary.io/reference
You need to reference this API documenation. The first thing, for instance, = is they require you to get an API key for instance. You will also need to be aware that they limit the rate at which you can make requests. Without knowing more specifics its hard to give more detail about how to construct the queries.
Hope this helps.
Im programming an app that has to be able to allow the users to sign up using their soundcloud accounts, so far I haven't found any usefull tutorial using Omniauth, Can anyone help me giving some tips to start with?
I gave a presentation to my local meetup about integrating OmniAuth into your application using a demo application here. You can fork it and go through the steps in section 3 of the README. There are also some slides you can look at here.
There's a lot of refactoring that needs to still be done, but it was designed to be a basic intro start to a bunch of people who had never used OmniAuth before.
I also list resources that helped with putting together the presentation. I highly recommend checking them out.
Although the examples are not with the omniauth-soundcloud, it should work similarly.
Is it possible to use a preexisting Rails app (preferably one that only has the user authentication system already setup) as a template by changing it to do what you want it to do?
I was hoping that there is something like wordpress is for php, that I can add to to make it do what I want it to do. Wordpress already has the user authentication and other important things built in. I can then go in and make it do what I want.
This question might reveal a fundamental misunderstanding of the framework concept, but I had to ask.
p.s. - Another way to ask this question could be "Can I take a basic Rails app with user authentication and then refactor it and add my own models?"
These two solutions appear to be what I am looking for:
https://github.com/RailsApps/rails-composer/
and
http://blog.bryanbibat.net/2011/01/03/starting-a-professional-rails-app-with-haml-rspec-devise-and-web-app-theme/
I will go through the tutorials and report back.
I need to implement reCaptcha into a Rails app form for my internship. Unfortunately I am still taking my Web Programming classes and haven't gotten into any server side lessons yet, so I am still a complete noob when it comes to submitting forms and sending requests to servers, let alone not using RoR before I started the internship. I have been trying to find a tutorial to follow, but all that I've found assume more experience with web development.
I have the public/private keys from the site and have installed the plugin, but am completely lost now. Obviously I don't want someone to just tell me what I should code, but if someone could tell me where I need to go after this that would be fantastic. I know that I need to add <%= recaptcha_tags %> where I want reCaptcha to appear, but I haven't been able to find anything pertaining to what I need to code for the helpers or what kind of JavaScript I need to implement. I know I need to do some AJAX calls, but again, NO idea what to do or where to start.
Any tips, pointers or references to tutorials would be fantastical and I would love you forever and a day. Thanks!
look here
https://developers.google.com/recaptcha/docs/customization
http://hwork.org/2009/03/08/recaptcha-on-rails/
http://blog.ncodedevlabs.com/2010/01/26/implementing-recaptcha-in-your-rails-app/
or the best place :
http://google.com