diff options
author | Ivan Kohler <ivan@freeside.biz> | 2013-05-10 12:55:52 -0700 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2013-05-10 12:55:52 -0700 |
commit | 63973c641c4be00765fa27e55c57cc5b9aa4da19 (patch) | |
tree | 68ea71023d7116229e97fd27b38b87b5ac65228a /eg/Auth-my_external_auth.pm | |
parent | 7b5a266236857fbb4bbf8d4ac3031c3fec75cac2 (diff) | |
parent | 0832972047a36d19ffcf7d1462abc48de7045d3d (diff) |
merge NG auth, RT#21563
Diffstat (limited to 'eg/Auth-my_external_auth.pm')
-rw-r--r-- | eg/Auth-my_external_auth.pm | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/eg/Auth-my_external_auth.pm b/eg/Auth-my_external_auth.pm new file mode 100644 index 000000000..8eda462f8 --- /dev/null +++ b/eg/Auth-my_external_auth.pm @@ -0,0 +1,28 @@ +package FS::Auth::my_external_auth; +use base qw( FS::Auth::external ); #need to inherit from ::external + +use strict; + +sub authenticate { + my($self, $username, $check_password, $info ) = @_; + + #your magic happens here + + if ( $auth_good ) { + + #optionally return a real name + #$info->{'first'} = "Jean"; + #$info->{'last'} = "D'eau"; + + #optionally return a template username to copy access groups from that user + #$info->{'template_user'} = 'username'; + + return 1; + + } else { + return 0; + } + +} + +1; |