module

Mangrullo::WebAuth

Optional HTTP Basic authentication for the web UI.

Enabled by setting both MANGRULLO_WEB_USER and MANGRULLO_WEB_PASSWORD; with either unset the UI is open, matching previous behavior.

Class methods

authorized?(auth_header : String | Nil, user : String, password : String) : Bool

Constant-time credential check against a Basic "Authorization" header. The password may contain colons: everything after the first colon in the decoded credentials is treated as the password.

Source
enabled?(user : String | Nil, password : String | Nil) : Bool
Source