]> git.michaelhowe.org Git - packages/libl/liblemonldap-ng-portal-auth-my-kerberos-perl.git/commitdiff
Kerberos -> KerberosAuth
authorMichael Howe <michael@michaelhowe.org>
Thu, 23 Jul 2020 20:16:32 +0000 (21:16 +0100)
committerMichael Howe <michael@michaelhowe.org>
Thu, 23 Jul 2020 20:16:32 +0000 (21:16 +0100)
Otherwise you get weird collisions with the shipped Kerberos module

Build.PL
debian/changelog
debian/control
lib/Lemonldap/NG/Portal/Auth/My/Kerberos.pm [deleted file]
lib/Lemonldap/NG/Portal/Auth/My/KerberosAuth.pm [new file with mode: 0644]

index d64e84b77a015c0951915d4741c157ab570fe293..547a22b2eba69e31daa8c707cd590bbce4bb46c4 100644 (file)
--- a/Build.PL
+++ b/Build.PL
@@ -1,6 +1,6 @@
 use Module::Build;
 my $build = Module::Build->new(
-    module_name => 'Lemonldap::NG::Portal::Auth::My::Kerberos',
+    module_name => 'Lemonldap::NG::Portal::Auth::My::KerberosAuth',
     license     => 'perl',
 );
 $build->create_build_script;
index a39b77b518395cd2f150660f79c68b5edda391eb..4ac4756456dbe7ef81ae29daf5e09a65790bb6af 100644 (file)
@@ -1,5 +1,7 @@
-liblemonldap-ng-portal-auth-my-kerberos-perl (1.0~test.0) unstable; urgency=medium
+liblemonldap-ng-portal-auth-my-kerberosauth-perl (1.0~test.1) unstable; urgency=medium
 
   * Initial Release.
+  * Rename because there are collisions with the Kerberos name, so use
+    KerberosAuth instead
 
  -- Michael Howe <michael@michaelhowe.org>  Tue, 19 May 2020 16:13:11 +0100
index c39045a4a4d49a31d08c47bd6052849eb6cd56ce..89dd3a63f8fe3e5d47c0eec1af1795c5b94a883b 100644 (file)
@@ -1,4 +1,4 @@
-Source: liblemonldap-ng-portal-auth-my-kerberos-perl
+Source: liblemonldap-ng-portal-auth-my-kerberosauth-perl
 Section: perl
 Priority: optional
 Maintainer: Michael Howe <michael@michaelhowe.org>
@@ -8,9 +8,10 @@ Standards-Version: 4.1.3
 #Vcs-Browser: https://salsa.debian.org/debian/liblemonldap-ng-portal-auth-my-kerberos-perl
 #Vcs-Git: https://salsa.debian.org/debian/liblemonldap-ng-portal-auth-my-kerberos-perl.git
 
-Package: liblemonldap-ng-portal-auth-my-kerberos-perl
+Package: liblemonldap-ng-portal-auth-my-kerberosauth-perl
 Architecture: all
 Depends: ${misc:Depends}, ${perl:Depends}, liblemonldap-ng-portal-perl, libauthen-krb5-simple-perl
+Replaces: liblemonldap-ng-portal-auth-my-kerberos-perl
 Description: Custom Kerberos class for lemonldap-ng
  This package provides a custom Kerberos class for liblemonldap-ng.
  .
diff --git a/lib/Lemonldap/NG/Portal/Auth/My/Kerberos.pm b/lib/Lemonldap/NG/Portal/Auth/My/Kerberos.pm
deleted file mode 100644 (file)
index 0769299..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-package Lemonldap::NG::Portal::Auth::My::Kerberos;
-
-use strict;
-use Mouse;
-use Authen::Krb5::Simple;
-#use Data::Dumper;
-use Lemonldap::NG::Portal::Main::Constants qw(
-  PE_BADCREDENTIALS
-  PE_ERROR
-  PE_OK
-);
-
-#extends qw(Lemonldap::NG::Portal::Main::Auth);
-extends qw(Lemonldap::NG::Portal::Auth::_WebForm);
-
-our $VERSION = '1.0.0';
-
-# INITIALIZATION
-
-# RUNNING METHODS
-
-sub init {
-    my $self = shift;
-    return $self->Lemonldap::NG::Portal::Auth::_WebForm::init();
-}
-#sub extractFormInfo {
-#    return PE_OK;
-#}
-
-sub authenticate {
-    my ( $self, $req ) = @_;
-
-#    $self->userLogger->error( Dumper( $req ) );
-    my $krb5 = Authen::Krb5::Simple->new();
-    my $authen = $krb5->authenticate( $req->{user}, $req->data->{password} );
-
-    if( $authen ){
-#        $req->user( $req->{user} );
-        $self->userLogger->notice("Good Kerberos authentication for $req->{user}");
-        return PE_OK;
-    } else {
-        $self->userLogger->error("Kerberos authentication for $req->{user} failed: " . $krb5->errstr());
-        return PE_BADCREDENTIALS;
-    }
-}
-
-sub setAuthSessionInfo {
-    my ( $self, $req ) = @_;
-    $req->sessionInfo->{authenticationLevel} = 2;
-    PE_OK;
-}
-
-sub authLogout {
-    PE_OK;
-}
-
-#sub getDisplayType {
-#    return 1;
-#}
-1;
-
diff --git a/lib/Lemonldap/NG/Portal/Auth/My/KerberosAuth.pm b/lib/Lemonldap/NG/Portal/Auth/My/KerberosAuth.pm
new file mode 100644 (file)
index 0000000..2afddde
--- /dev/null
@@ -0,0 +1,61 @@
+package Lemonldap::NG::Portal::Auth::My::KerberosAuth;
+
+use strict;
+use Mouse;
+use Authen::Krb5::Simple;
+#use Data::Dumper;
+use Lemonldap::NG::Portal::Main::Constants qw(
+  PE_BADCREDENTIALS
+  PE_ERROR
+  PE_OK
+);
+
+#extends qw(Lemonldap::NG::Portal::Main::Auth);
+extends qw(Lemonldap::NG::Portal::Auth::_WebForm);
+
+our $VERSION = '1.0.0';
+
+# INITIALIZATION
+
+# RUNNING METHODS
+
+sub init {
+    my $self = shift;
+    return $self->Lemonldap::NG::Portal::Auth::_WebForm::init();
+}
+#sub extractFormInfo {
+#    return PE_OK;
+#}
+
+sub authenticate {
+    my ( $self, $req ) = @_;
+
+#    $self->userLogger->error( Dumper( $req ) );
+    my $krb5 = Authen::Krb5::Simple->new();
+    my $authen = $krb5->authenticate( $req->{user}, $req->data->{password} );
+
+    if( $authen ){
+#        $req->user( $req->{user} );
+        $self->userLogger->notice("Good Kerberos authentication for $req->{user}");
+        return PE_OK;
+    } else {
+        $self->userLogger->error("Kerberos authentication for $req->{user} failed: " . $krb5->errstr());
+        return PE_BADCREDENTIALS;
+    }
+}
+
+sub setAuthSessionInfo {
+    my ( $self, $req ) = @_;
+    $req->sessionInfo->{authenticationLevel} = 2;
+    PE_OK;
+}
+
+sub authLogout {
+    PE_OK;
+}
+
+#sub getDisplayType {
+#    return 1;
+#}
+1;
+