Authentication in zend framework 2 - zend-framework2

I am going to write an Authentication module using the Zend Framework 2. To help me with this process, I found this tutorial in the web. However, when I run this module, it shows this message:
Class Zend\Authentication\Adapter\AdapterChain does not exist
What is the meaning of this message?
Additionally, do you know of a Zend Framework 2 Authentication tutorial I could use for assisstance as I write my own?

Look at ZFC-Common's ZfcAcl.

you can create your own customized plugin in zf2 something like this
Acl implimentation in ZF2

The EdpUser as mentioned above has been consumed by ZfcUser. That works will with ZF2 as Evan Dot Pro is a core contributor to ZF2. In relation to managing Acl's, ZfcAcl is currently not working with ZF2 RC1. It's a little behind the time now.
They have a RFC open to make updates but that looks like it's a little way down the line. I'd possibly recommend using BjyAuthorize. Zf-Commons are considering taking this over as well.

Try Authentication + Acl using EventManager. It looks like easier than ZfcAcl.

I was also using this tutorial month ago is to old and not working with beta5
You can try to play with
https://github.com/EvanDotPro/EdpUser it nicely writen and have cool things as view helpers for login form and auth status

I have created my own authentication adapter for this in one of my projects. I've created a gist. You can use it like this:
$adapter = new AdapterChain([
new \Zend\Authentication\Adapter\Ldap(/* ... */),
new \Zend\Authentication\Adapter\DbTable(/* ... */)
// ...
]);
$authService = new AuthenticationService();
$authService->setAdapter($adapter);

Related

Custom Routing with OData and Asp.NET Web API

So I am writing an API that will return OData but I have a problem with the default routing convention. Due compatibility reasons I can not use the default convention.
In other words, I need to change the routing from
/api/customers(1)/something
to
/api/costumers/1/something
Any reference or idea to help me? :)
Thanks
I think what you are looking is key-as-segment. It's not original supported in Web API OData. See https://github.com/OData/WebApi/issues/105
However, you can code a little bit to support it. For example:
Derived from DefaultODataPathHandler, implement the necessary function, enable the UriParser to support KeyAsSegment:
uriParser.UrlConventions = ODataUrlConventions.KeyAsSegment;
Hope it can help you.
If you are using System.Web.OData, Version=5.9.0.0, this can be done by invoking the following extension method when configuring your service on startup:
using System.Web.OData.Extensions;
...
// This is just to show the type, this will likely come from the web app startup
HttpConfiguration config = new HttpConfiguration();
...
config.SetUrlConventions(ODataUrlConventions.KeyAsSegment);

neo4j.Asp.Net.Identity Sample Project

I'm new at neo4j and I want to use neo4j.Asp.Net.Identity for authentication and authorization but I can't find any sample that implements that.Anybody knows how can I find a sample for that?
I'm also want to use Token-Base authentication for authentication and authorization.
The project is here: https://github.com/assimoes/Neo4j.AspNet.Identity the problem you'll have is that it doesn't implement the third-party authentication - i.e. you can't just drop it in and it'll work with something like MVC's Facebook/Twitter stuff.
Your best bet is to get the code from GitHub and reference the project directly as you're going to have to implement some new interfaces, and personally - I would change the implementation of the data structure - roles, authentication tokens don't work (if I remember correctly) - so you'd probably need to fix them.
You might actually be better off using my fork: https://github.com/cskardon/Neo4j.AspNet.Identity which I've been playing around with for a while in an MVC5 project and it's working so far (I'll create a demo version of the MVC5 soonish).
There is now a NuGet package for it. Click on the link in the Nuget documentation, and it should take you to the appropriate web-site.

How to use plugins in php mvc framework

I want to know that , i am using my own (modal view controller) framework and want to add some plugins like live chatting ,Facebook/g-mail/twitter (sign up/sign in using these websites).
type of features how can i do this?
I am novice in this field so sorry in advance if my question has some stupidity.
I am using notepad++ editor.
thanks in advance.
Use observer pattern or Event dispatcher pattern for plugins.
Have a look how other frameworks allow you to implement these features.
If one of those features just need js/css and custom html markup to work (like a Facebook like-button for example), you might find some inspiration from Zend Framework's View Helpers.
Search through github/packagist if one of those features has not yet been developed. If you find some library, find a way to use it in your custom code.

How to implement Login using Membership provider into MVC 4 application ?

I want to implement login/change password/forget password into MVC 4 Application.
Can any one guide me how i could achieve this using Membershiop in MVC 4?
** This type of open ended question are normally down voted. You need to be more specific with the problem you are facing and share your analysis. **
I will try to give you some pointer if you have not already figure out from a simple google search.
You can use SimpleMembershipProvider if your are using MVC 4. If you create a new MVC 4 application in Visual Studio, you will get a precooked working form authentication enabled internet application.
Go through the code in AccountController, you will find most of the functionality already implemented with the help of WebSecurity wrapper class. Go from there and share specific issue you face.
You can refer following two links to start with:
http://www.codeguru.com/csharp/.net/net_asp/mvc/using-simplemembership-in-asp.net-mvc-4.htm
http://www.codeproject.com/Articles/689801/Understanding-and-Using-Simple-Membership-Provider

How to create user account in grails using netbeans?

I have problem in creating user account in grails using netbeans. Show me the coding of how to create the new user account in grails using the netbeans IDE.
Don't expect this to be quick and easy. You have to create User class yourself before creating new Users, and set it up to work as a User.
Start with learning some security plugin - spring-security, I suggest.
If you need to manage users, start with creating required domain classes and spring-security-ui.
And this has nothing to do with Netbeans or whatever IDE, it's just the code you create with it.
Check out this screencast-series, which explains everything. It is done with SpringSource Toolsuite, but you can do it in whatever editor you use (e.g. Netbeans)
http://blog.springsource.com/2010/08/11/simplified-spring-security-with-grails/
Greetings,
Jan

Resources