authcrunch / authcrunch.github.io

Documentation for Caddy v2 Auth Portal and Authorize Plugins.
77 stars 32 forks source link

adding local users via identity store config #20

Closed greenpau closed 4 months ago

greenpau commented 2 years ago

Document the following behavior.

The user directive would force the creation or verification of a user at the initialization of a local identity store. This configuration applies only to local identity stores. If a user already exists, no action would be taken, unless it is a password overwrite.

        local identity store localdb {
            realm local
            path {$HOME}/.local/caddy/localdb/users.json
            user webadmin {
                name Webmaster
                email webadmin@localhost.localdomain
                password "bcrypt:10:$2a$10$WiU7BR1vqCNnzP5rZltJ5Ow5RspiIgnenCCFGSeMPrFFUhHRpkIhe" overwrite
                roles authp/admin authp/user
            }
            user jsmith {
                name John Smith
                email jsmith@localhost.localdomain
                password "My@Password123"
                roles authp/user
            }
        }

This is related to https://authp.github.io/docs/authenticate/local/local

greenpau commented 4 months ago

Documented https://docs.authcrunch.com/docs/authenticate/local/static-users