Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Support HTTP-basic-authentication as well as params-authentication. #80

Closed
wants to merge 1 commit into from

1 participant

@Hakon

Hi. I added support for HTTP-basic authentication with this strategy. The old way of selecting the data directly from the params object is replaced with the devise-supplied authentication hash.

@cschiewek cschiewek closed this in 6658e69
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/devise_ldap_authenticatable/strategy.rb
View
2  lib/devise_ldap_authenticatable/strategy.rb
@@ -9,7 +9,7 @@ class LdapAuthenticatable < Authenticatable
# success and the authenticated user if everything is okay. Otherwise redirect
# to sign in page.
def authenticate!
- resource = valid_password? && mapping.to.authenticate_with_ldap(params[scope])
+ resource = valid_password? && mapping.to.authenticate_with_ldap(authentication_hash.merge(:password => password))
if validate(resource)
success!(resource)
else
Something went wrong with that request. Please try again.