Laravel Auth error with session - authentication

I'm working on an old database which I can not modify.
What I'm trying to do is a Login for users for that database, the username and password fields are with another name so I had to change some variables in Laravel and it is working, it redirects me to /home if the authentication is valid.
The problem is that when the redirection is done, the session files are created but the session is NULL so the user is redirected to login page again.
I have seen a lot of threads with this similar issue, but no answer has worked for me.
model http://pastebin.com/TZviQwDA
controller http://pastebin.com/nQ5KSGmU

Don't bother messing up with Variables and so on!
Assuming knowing the user's id (no need to know neither username nor password), you can emulate programmatically a login using the following snippet where id=1 or pick up another valid one:
$user = User::find(1);
Auth::login($user);
or even better:
Auth::loginUsingId(1);

I "fixed" my problem by downgrading Laravel to 4.0, I suppose I will wait until a new version to see if it works.
Thanks.

Related

Camunda Authorization of cockpit-application not working

I authorized the group of a user to the cockpit-application. I gave the group full access to the Process Definition and Process Instance authorizations. (so pretty much as described in the documentation)
When I try to log the user in, I see the Welcome screen and in the application overview the option to navigate to the cockpit-application.
However, when I click this, I get the Login screen again.
For a fraction of a second I see the cockpit application, but then it immidiatly redirects to the login page. When I try to log in again, it keeps redirecting me to this login screen.
I configured another group to use the Tasklist application and that is working as expected.
I tried to give the authorization on user-level instead of group-level but the same problems occurs.
(n.b.: I am using the Spring-Camunda-Starter for this application.)
I found the problem, I accidentally removed one of the authorizations the system automatically creates when the user is created. I think I might have removed this, as I thought it was not necessary.
It is in the User Authorizations, every user has an authorization from it's own user to that user. When I added this, it fixed the problem.
I found the solution when another user logged in and had no problems. And the found this to be the only difference between the two accounts.
Hopefully this will help someone in the future!

How to prevent same user login from multiple times at the same time in MVC4

I am working on web application in MVC4-asp.net.For login I am using Simple membership Provider method to login.All is working properly but according to project requirement there will be no same user can not login at the same time on different machine.how to make changes in MVC simple membership.if any user is logged in and any one try to login at the same time using same username then it will be display message like "This user is already Logged In" and user will be not able to log in at that time.
Please give some suggestion on that.
Thanks in advance.
You Can do it by many ways, simple approach is
Set one flag at the time of login into database.
Check flag every time when you are sign in.
Remove flag at time of logout.
There are some issues in using this approach like what if user is close browser without logged out, for that you can set session time out.Hope this will help.

How to use friend with compojure?

I'm fairly new to clojure, and I'm trying to add an authentication system to a compujure app and for that I'm using cemerick.friend.
All the routes are working fine, but I'm never able to login, even when using a dummy in memory database (if you can call it that).
The problem, I believe, is on the cemerick.friend.credentials/bcrypt-credential-fn, which is never validating my credentials.
Here's a gist with the relevant code: https://gist.github.com/zamith/5940965
Any help on how to solve this problem would be nice.
Thanks.
You want to use workflows/interactive-form where currently you specify workflows/interactive-login-redirect.
The latter function's purpose is to serve as the default :login-failure-handler. What it does is perform the redirect after a failed login attempt; it certainly makes no attempt to log a user in.
You also need to remove the (resp/redirect "/signup") from the body of the friend/authenticated form in your "/dashboard" route, as it's unconditionally redirecting logged in users to the signup page. (That the redirect happens is in fact proof of the user being authenticated, since otherwise the body of friend/authenticated would not be evaluated and there's nothing else in the code which could cause a redirect to "/signup".)
With these two changes, the app works for me.

Kohana Authlite - not allow two users logged in ith the same credentials the same session

i am using authlite authentication module for my kohana 3 website. Now it is possible for two users to login using the same credentials, in the same session. i don't want this to happen for security reasons.
is there any possibility for me to avoid it?
thanks a lot
Auth does not do that sort of a check for you. If you want that, you'll need to overwrite the function that does the token generation and add some code to:
keep records of who is logged in
check login against the list of previous user->token records and log old ones out
assign new token

Problems with fe_login

I have a problem with TYPO3's front end user login extension, It correctly detects correct logins and logouts but if I enter an incorrect user/password combination then It doesn't show any error or warning message (which are defined).
I've tried to trace the extension code and print all states and request values and discovered that once incorrect login attempt is detected it "erases" any session or request variable like It would be the first time a user enters the page.
I am using TYPO3 4.5.2, if any one has a clue about what's going on it would really helpful.
Some ideas:
Try to test this behaviour without being logged into the backend
(e.g. in another browser).
Update TYPO3 (or felogin extension).
Cookie handling might be an issue, too:
Delete all cookies from your domain
Check if setting $TYPO3_CONF_VARS['SYS']['cookieDomain'] ins localconf.php resolves the issue [Howto]