blob: 8eda462f8b27eefd6177032b8477f78d4791ece3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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;
|