Cataly...e::IMAP(3pm)

πŸ“¦
version 1.05+20240702 Β· 5 versions
, in debian trixie, ubuntu resolute

πŸ’– Catalyst::Authentication::Store::IMAP πŸ’–

okay bestie, so this is the manual page for Cataly...e::IMAP(3pm) β€” yes the name is literally abbreviated like that in the wild, it's giving "we ran out of room on the shelf" energy, iconic behavior honestly. Sit down, grab a strawberry πŸ“, and let me tell you about this absolute gem of a module.


✨ NAME ✨

Catalyst::Authentication::Store::IMAP β€” an authentication store that goes and talks to an IMAP server. That's it, that's the vibe. πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

here's the whole setup, copied exactly so you can paste it and go:

use Catalyst qw(
  Authentication
  );

__PACKAGE__->config(
  'authentication' => {
     default_realm => "imap",
     realms => {
       imap => {
         credential => {
           class          => "Password",
           password_field => "password",
           password_type  => "self_check",
         },
         store => {
           class => 'IMAP',
           host  => 'localhost',
         },
       },
     },
   },
);

sub login : Global {
    my ( $self, $c ) = @_;

    $c->authenticate({
                      id          => $c->req->param("login"),
                      password    => $c->req->param("password")
                     });
    $c->res->body("Welcome " . $c->user->username . "!");
}

like. look at it. default_realm => "imap", realms nested inside realms, self_check doing its lil thing β€” it's a whole ecosystem and honestly it slays. 🌈


🌸 DESCRIPTION 🌸

so basically, this plugin implements the Catalyst::Authentication v.10 API. and like, fr fr, if you're upgrading from a previous version of this plugin, read that documentation first β€” past you and present you will thank you, no cap. πŸ™ˆ

it uses Mail::IMAPClient to let your application authenticate against an IMAP server. and here's the cute part: the IMAP client object it uses gets stored on the stash as imapclient, so other components in your app can just grab it and use it too. sharing is caring, periodt. 🫢


πŸ‘‘ CONFIGURATION OPTIONS πŸ‘‘

πŸ’œ host

sets the host name (or IP address, whatever, both are valid) of the IMAP server you're connecting to.

πŸ’œ port

optionally set the port to connect to. the default is 143.

🚨 real talk bestie: if you specify port 993, then IO::Socket::SSL will be used for connecting. so yes, that's the secure one. slay. πŸ”₯

πŸŽ€ ATTRIBUTES πŸŽ€

πŸ’œ host

the host name used to connect to. yes it's the same name as the config option, no they're not gaslighting you, that's just how it is. πŸ’€


⭐ METHODS ⭐

  • new
  • from_session
  • find_user

that's the list, babe. all three of them, right there, nothing more to see. ✨


🌈 SEE ALSO 🌈

  • Catalyst::Authentication::Store::IMAP::User
  • Catalyst::Plugin::Authentication
  • Mail::IMAPClient

go read them, iykyk. πŸ“š


πŸ’– AUTHORS πŸ’–

Stefan Seifert <nine@cpan.org>

shoutout to Stefan, absolute legend, we love to see it. πŸ‘‘


🧚 LICENSE 🧚

This library is free software, you can redistribute it and/or modify it under the same terms as Perl itself. so like, free as in free, bestie. do your thing, just keep the terms the same. πŸ’…


and that's the whole page, mwah πŸŽ€ β€” brought to you by perl v5.40.1 and dated 2025-03-02. go authenticate something, main character. πŸ¦‹βœ¨

πŸ“¦ where this page comes from