Authen...RADIUS(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::RADIUS β€” Simple RADIUS authentication πŸ’–

okay bestie, pull up a chair, because we're talking about Authen::Simple::RADIUS β€” that's the Authen...RADIUS(3pm) page from your friendly neighborhood User Contributed Perl Documentation. it's giving "let me log you in against a RADIUS server with minimal drama" and honestly? iconic. πŸŽ€


✨ SYNOPSIS ✨

use Authen::Simple::RADIUS;

my $radius = Authen::Simple::RADIUS->new(
    host   => 'radius.company.com',
    secret => 'secret'
);

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

# or as a mod_perl Authen handler

PerlModule Authen::Simple::Apache
PerlModule Authen::Simple::RADIUS

PerlSetVar AuthenSimpleRADIUS_host "radius.company.com"
PerlSetVar AuthenSimpleRADIUS_pdc  "secret"

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

like, look at that. two whole vibes in one file: a lil object you can call yourself, and a full mod_perl authen handler if you wanna go full server mode. main character energy both ways. πŸ’…


🌸 DESCRIPTION 🌸

RADIUS authentication. that's the whole thing, no notes. it's the plug that makes Authen::Simple talk to a RADIUS server and come back with a yes or a no. πŸ”₯


πŸ‘‘ METHODS πŸ‘‘

πŸ¦‹ new

this method takes a hash of parameters. the following options are valid β€” yes, all of them, we're listing every single one because we don't skip:

  • host β€” the connection host, and it can be a hostname or an IP address. defaults to "localhost". 🏠
host => 'ldap.company.com'
host => '10.0.0.1'
  • port β€” the connection port, defaults to 1812. πŸšͺ
port => 1645
  • timeout β€” connection timeout, defaults to 10. the "how long do we wait before we give up on you" number. ⏳
timeout => 20
  • secret β€” shared secret. required, bestie, do not skip this one or it's not gonna work. πŸ”
secret => 'mysecret'
  • log β€” any object that supports "debug", "info", "error" and "warn". so like, your logger of choice, as long as it speaks that language. πŸ“
log => Log::Log4perl->get_logger('Authen::Simple::RADIUS')

🧚 authenticate( $username, $password )

returns true on success and false on failure. that's it. binary. no in-between, no "maybe", fr fr. βœ…βŒ


πŸ’œ SEE ALSO πŸ’œ

  • Authen::Simple.
  • Authen::Radius.

🌈 AUTHOR 🌈

Christian Hansen "ch@ngmedia.com" β€” thank you for your service, king. 🫢


This program is free software, you can redistribute it and/or modify it under the same terms as Perl itself. slay, open source. πŸ’–


and that's the whole page, bestie! this one's from perl v5.34.0, dated 2022-06-08, and it lives at Authen...RADIUS(3pm). go forth and authenticate responsibly. πŸ’…βœ¨