Dancer...Config(3pm)
π 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
- debian bookworm: libdancer-plugin-auth-extensible-perl 1.00-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libdancer-plugin-auth-extensible-perl 1.00-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libdancer-plugin-auth-extensible-perl 1.00-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libdancer-plugin-auth-extensible-perl 1.00-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libdancer-plugin-auth-extensible-perl 1.00-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms