Dancer2...::Config(3)

πŸ“¦ version 0.714.0, in opensuse-leap 16.0

πŸŽ€ NAME πŸŽ€

okay bestie, welcome to Dancer2...::Config(3), straight outta the User Contributed Perl Documentation corner of the internet ✨

The full name is Dancer2::Plugin::Auth::Extensible::Provider::Config β€” example auth provider using app config. That's the whole NAME moment, and it ate πŸ’…


πŸ’– DESCRIPTION πŸ’–

This is a simple authentication provider which authenticates based on a list of usernames, passwords (crypted, preferably β€” see below) and role specifications provided in the realm definition in your app's config file. No cap, it's literally doing auth from config.

This class is primarily intended as an example of what an authentication provider class should do; however, if you just want simple user authentication with user details stored in your app's config file, it may well suit your needs. It's giving "example but also lowkey useful" energy.

See Dancer2::Plugin::Auth::Extensible for details on how to use the authentication framework. iykyk 🫢


🌸 SYNOPSIS 🌸

In your app's config.yml:

plugins:
    Auth::Extensible:
        realms:
            config:
                provider: Config
                users:
                    - user: dave
                      pass: supersecret
                      roles:
                        - Developer
                        - Manager
                        - BeerDrinker
                    - user: bob
                      pass: '{SSHA}+2u1HpOU7ak6iBR6JlpICpAUvSpA/zBM'
                      roles:
                        - Tester

As you can see, you can define the usernames, passwords (please use crypted passwords, RFC2307-style, not plain text (although plain text is supported, but really not a good idea), and the roles for each user (if you're not planning to use roles, omit the roles section from each user entirely). Yes, the nested parentheses are dramatic, but they're also accurate, bestie 😌


πŸ¦‹ ATTRIBUTES πŸ¦‹

πŸ“ users πŸ“

Array reference containing users from configuration. That's it, that's the attribute.


πŸ‘‘ METHODS πŸ‘‘

πŸ’… authenticate_user $username, $password πŸ’…

πŸ”₯ get_user_details $username πŸ”₯

⭐ get_user_roles $username ⭐

The manpage keeps it cute and just lists the signatures β€” no extra lore here.


mwah πŸ’‹ β€” this page's footer moment is brought to you by perl v5.42.0, dated 2026-08-25, and it's literally Dancer2...::Config(3) all the way down. slay πŸ’–

πŸ“¦ where this page comes from