aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/plugins
diff options
context:
space:
mode:
authorRodney Ewing <ewing.rj@gmail.com>2013-05-23 13:28:03 -0700
committerRodney Ewing <ewing.rj@gmail.com>2013-05-24 16:52:50 -0700
commitb194f29fe3f295b2426fb0ef4809fee6e74c17e7 (patch)
tree5df90a8769ce86161172e2e82021569219f40df1 /mediagoblin/plugins
parent57e8be21bcd832a36fbc8feac03dba941ef4d370 (diff)
downloadmediagoblin-b194f29fe3f295b2426fb0ef4809fee6e74c17e7.tar.lz
mediagoblin-b194f29fe3f295b2426fb0ef4809fee6e74c17e7.tar.xz
mediagoblin-b194f29fe3f295b2426fb0ef4809fee6e74c17e7.zip
added gen_password_hash and check_password functions to auth/__init__
Diffstat (limited to 'mediagoblin/plugins')
-rw-r--r--mediagoblin/plugins/basic_auth/__init__.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/mediagoblin/plugins/basic_auth/__init__.py b/mediagoblin/plugins/basic_auth/__init__.py
index d0545627..2d6f7dbd 100644
--- a/mediagoblin/plugins/basic_auth/__init__.py
+++ b/mediagoblin/plugins/basic_auth/__init__.py
@@ -71,6 +71,10 @@ def gen_password_hash(raw_pass, extra_salt):
return auth_lib.bcrypt_gen_password_hash(raw_pass, extra_salt)
+def check_password(raw_pass, stored_hash, extra_salt):
+ return auth_lib.bcrypt_check_password(raw_pass, stored_hash, extra_salt)
+
+
def auth():
return True
@@ -94,6 +98,7 @@ hooks = {
'auth_get_login_form': get_login_form,
'auth_get_registration_form': get_registration_form,
'auth_gen_password_hash': gen_password_hash,
+ 'auth_check_password': check_password,
'auth_fake_login_attempt': auth_lib.fake_login_attempt,
'template_global_context': append_to_global_context,
('mediagoblin.plugins.openid.register',