NG auth: internal db auth, RT#21563
[freeside.git] / eg / Auth-my_external_auth.pm
diff --git a/eg/Auth-my_external_auth.pm b/eg/Auth-my_external_auth.pm
new file mode 100644 (file)
index 0000000..38f9d5b
--- /dev/null
@@ -0,0 +1,27 @@
+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 ) = @_;
+
+  #magic happens here
+
+  if ( $auth_good ) { #verbose for clarity
+    return 1;
+  } else {
+    return 0;
+  }
+
+}
+
+#omitting these subroutines will eliminate those options from the UI
+
+#sub create_user {
+#
+
+#sub change_password {
+#}
+
+1;