Skip to content

Authentication

Mattia Roccoberton edited this page May 2, 2023 · 1 revision

SimpleAuth

A plugin to authenticate with a password only. Disclaimer: this plugin is provided as example, if you need a secure authentication I suggest to create your own.

authentication:
  plugin: TinyAdmin::Plugins::SimpleAuth
  password: 'f1891cea80fc05e433c943254c6bdabc159577a02a7395dfebbfbc4f7661d4af56f2d372131a45936de40160007368a56ef216a30cb202c66d3145fd24380906'
  login: TinyAdmin::Views::Pages::SimpleAuthLogin

login is optional, it permits to change the view page object to render the login form. If you want to customise it I would suggest to take a look to the default login view (SimpleAuthLogin).

Sometimes it could be useful to provide the password hash programmatically (after the configure_from_file line):

TinyAdmin.configure do |settings|
  settings.authentication[:password] = Digest::SHA512.hexdigest('changeme')
end

Or:

TinyAdmin.settings.authentication[:password] = Digest::SHA512.hexdigest('changeme')

NoAuth

No authentication plugin. There are no specific options available.

Sample:

authentication:
  plugin: TinyAdmin::Plugins::NoAuth
Clone this wiki locally