Standalone user management library that supports Doctrine ORM?
Asked Answered
C

2

8

I can't find a standalone system that I can use for user management (authentication,authorization, register, password reminders...).

The closest it gets is using Symfony and FOSUserBundle but because it's a Symfony Bundle it seem to be dependant on the framework. Is there a way to separate these or at least to load only few components of symfony?

I've used symfony before and I like it; I just don't need the entire framework for the current project.

I couldn't find other solutions.

Commutative answered 18/10, 2011 at 10:57 Comment(3)
What framework do you use in your current project?Emulate
There's no current project :) . I'm currently making a design decision before I start. I want modules as user management and routing to be as much decoupled as possible so I won't be relying on an entire framework if I can't disassemble it bit by bit and combine them into a Frankenstein. I want to use this system in old projects too.Commutative
Did you manage using it in your solution, @antitoxic? I'm looking for a way to check the authentification of user logged in via symfony in an external script. Can you help?Harquebusier
B
3

Honnestly, most projects have custom needs. Even using something like FOSUserBundle you'll have to re-implement or edit a big part of it.

If your project is not a "time-attack" project, take ~a week to build your own librairy. I'm not saying you should reinvent the wheel --base yourself on existing code--, but I think that most of the time, people that really take the time to design before starting a projects are in projects that are big enought to justify this kind of custom implementation.

Burgomaster answered 26/10, 2011 at 23:43 Comment(3)
"base yourself on existing code" What existing code? :) That's why I'm doing the entire thing - I want to know what I can base the user system on. I'll extend it of course. However I should be able to keep the original files untouched so that I receive updates to the vendor system.Commutative
FOSUserBundle was a good suggestion... no ? And I'm talking about doing your own librairy, not extending one. ;)Burgomaster
I can use it as an example yes :) I'm asking though whether I can actually use something, not to do a rewrite. Isn't this the main point of OO and modularity - to be reusable. Symfony Bundles doesn't even fit Silex (which is a symfony lite microframwork.Commutative
F
1

You could give a try to https://github.com/symfony/Security its Symfony2 component but can be used "standalone".

Depenedencies from composer.json file (https://github.com/symfony/Security/blob/master/composer.json#L19-24)

"symfony/event-dispatcher": ">=2.1",
"symfony/http-foundation": ">=2.1",
"symfony/http-kernel": ">=2.1"
Freund answered 24/10, 2011 at 12:47 Comment(5)
Do you have an implementation of this working? Because as far as I see it also need HttpFoundation and Routing. May be even more?Commutative
HttpFoundation and Routing are both pieces of Symfony that can be separated from the core and used at your own discretion. I see no need to reinvent the wheel.Vociferous
I don't need these, Dan. I mentioned I want to use the code in old projects. I don't want to drag other components in.Commutative
It's not standalone it require dependencies indicated in github.com/symfony/Security/blob/master/composer.json#L19-24, no I don't have any implementation.Freund
I didn't know that composer.json have these. Thanks!Commutative

© 2022 - 2024 — McMap. All rights reserved.