diff options
author | Ivan Kohler <ivan@freeside.biz> | 2013-12-26 12:39:36 -0800 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2013-12-26 12:39:36 -0800 |
commit | 7b42fc3d69f111b2e79f2a43263c129fd3505938 (patch) | |
tree | d0c5b25d551cc7859da7d500db87b43b78177b9d /FS/FS/Auth.pm | |
parent | d3c4d0df775c4dc2f8346ac29b7075753216bcb5 (diff) |
backport some unused new-style auth stuff from master for development purposes, should be harmless, RT#21563, RT#26097
Diffstat (limited to 'FS/FS/Auth.pm')
-rw-r--r-- | FS/FS/Auth.pm | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/FS/FS/Auth.pm b/FS/FS/Auth.pm new file mode 100644 index 000000000..543978e8b --- /dev/null +++ b/FS/FS/Auth.pm @@ -0,0 +1,25 @@ +package FS::Auth; + +use strict; +use FS::Conf; + +sub authenticate { + my $class = shift; + + $class->auth_class->authenticate(@_); +} + +sub auth_class { + #my($class) = @_; + + my $conf = new FS::Conf; + my $module = lc($conf->config('authentication_module')) || 'internal'; + + my $auth_class = 'FS::Auth::'.$module; + eval "use $auth_class;"; + die $@ if $@; + + $auth_class; +} + +1; |