Authen...rberos(3pm)

πŸ“¦
version 0.1 Β· 2 versions
  • 0.1 Β· debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking (latest)
  • 0.1 Β· ubuntu jammy
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

✨ Authen::Simple::Kerberos ✨

okay so bestie, welcome to the Authen::Simple::Kerberos page β€” it's from the User Contributed Perl Documentation collection, and it's literally the easiest way to do Kerberos authentication in Perl. yes, that Kerberos. the big scary tickets-and-realms one. it's giving "simple" and honestly? it ate. πŸ’…


🌸 SYNOPSIS 🌸

here's the vibe, copy-paste style:

use Authen::Simple::Kerberos;

my $kerberos = Authen::Simple::Kerberos->new(
    realm => 'REALM.COMPANY.COM'
);

if ( $kerberos->authenticate( $username, $password ) ) {
    # successfull authentication
}

# or as a mod_perl Authen handler

PerlModule Authen::Simple::Apache
PerlModule Authen::Simple::Kerberos

PerlSetVar AuthenSimpleKerberos_realm "REALM.COMPANY.COM"

<Location /protected>
  PerlAuthenHandler Authen::Simple::Kerberos
  AuthType          Basic
  AuthName          "Protected Area"
  Require           valid-user
</Location>

no cap, that second half is the mod_perl Authen handler route β€” you just drop it in your Apache config and your protected location is protected. iconic behavior honestly 🫢


πŸ¦‹ DESCRIPTION πŸ¦‹

Kerberos authentication. that's it. that's the description. short and slay πŸ’–


πŸ‘‘ METHODS πŸ‘‘

🌈 new

this method takes a hash of parameters. the following options are valid:

  • realm β€” the Kerberos realm. like:
realm => 'REALM.COMPANY.COM'
  • log β€” any object that supports debug, info, error and warn. for example:
log => Log::Log4perl->get_logger('Authen::Simple::Kerberos')

πŸ’« authenticate( $username, $password )

Returns true on success and false on failure. that's the whole method. yes it's that simple, and yes that's the point ✨


πŸŽ€ SEE ALSO πŸŽ€

  • Authen::Simple.
  • Authen::Krb5::Simple.

🧚 AUTHOR 🧚

Christian Hansen ch@ngmedia.com β€” legend behavior, thank you for your service 🫑


This program is free software, you can redistribute it and/or modify it under the same terms as Perl itself.


lowkey the whole point of this module is that you don't have to hand-roll Kerberos, you just set the realm and let it cook. πŸ”₯

and that's the page!! no notes, 10/10, go authenticate something. 🌟

courtesy of perl v5.34.0, dated 2022-06-08 β€” it's giving vintage but make it eternal πŸ’– bye bestie!! πŸ¦‹

πŸ“¦ where this page comes from