Dancer...Config(3pm)

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

πŸ’– Dancer::Plugin::Auth::Extensible::Config πŸ’–

okay so bestie, this is a page from the User Contributed Perl Documentation for manual section 3pm, and it's all about Dancer::Plugin::Auth::Extensible::Config β€” yes the name is a whole mouthful, we're gonna get through it together 🫢


✨ NAME ✨

Dancer::Plugin::Auth::Extensible::Config β€” an example auth provider that does its thing using your app config 🌸


🌈 DESCRIPTION 🌈

So basically this is a simple authentication provider, and the way it decides who gets in is by looking at a list of stuff you put in your app's config file: usernames, passwords (and pls pls pls use crypted ones β€” more on that below πŸ‘‡), and role specifications, all living inside the realm definition.

Lowkey, this class is mostly here as an example of what an authentication provider class is supposed to do. But fr fr, if all you want is simple user authentication with the user details chillin' in your app's config file? It might genuinely suit your needs. No cap. πŸ‘‘

If you wanna know how to actually use the authentication framework, go peek at Dancer::Plugin::Auth::Extensible for the details β€” iykyk πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

Put this 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

See how that works? You define the usernames, the passwords, and the roles for each user. πŸ¦‹

⚠️ okay serious moment bestie: please use crypted passwords, RFC2307-style. Not plain text. Plain text is supported, but it is really not a good idea. Like, at all. 🚩

And if you're not planning to use roles at all? Just omit the roles section from each user entirely. Easy. Clean. Iconic. ✨


and that's the whole page, bestie β€” you ate that πŸ’…πŸŒΈ

this lil' beauty shipped as part of perl v5.36.0, dated 2023-01-05. take care of her, she's doing her best πŸ«ΆπŸ’–

πŸ“¦ where this page comes from