File Browser
  • Welcome
  • Features
  • Installation
  • Upgrade from 1.x
  • Command Line Interface
    • filebrowser
    • filebrowser cmds
    • filebrowser cmds add
    • filebrowser cmds ls
    • filebrowser cmds rm
    • filebrowser config
    • filebrowser config cat
    • filebrowser config export
    • filebrowser config import
    • filebrowser config init
    • filebrowser config set
    • filebrowser hash
    • filebrowser rules
    • filebrowser rules add
    • filebrowser rules ls
    • filebrowser rules rm
    • filebrowser upgrade
    • filebrowser users
    • filebrowser users add
    • filebrowser users export
    • filebrowser users find
    • filebrowser users import
    • filebrowser users ls
    • filebrowser users rm
    • filebrowser users update
    • filebrowser version
  • Configuration
    • Custom Branding
    • Authentication Method
    • Command Runner
  • Contributing
    • Authentication Provider
    • Translations
    • CI and Releases
    • Code of Conduct
Powered by GitBook
On this page

Was this helpful?

  1. Contributing

Authentication Provider

PreviousContributingNextTranslations

Last updated 3 years ago

Was this helpful?

To build a new authentication provider, you need to implement the , whose method will be called on the login page after the user has submitted their login data.

// Auther is the authentication interface.
type Auther interface {
    // Auth is called to authenticate a request.
    Auth(r *http.Request, s *users.Storage, root string) (*users.User, error)
}

After implementing the interface you should:

  1. Add it to .

  2. Add it to the for the CLI.

  3. Add it to the .

If you need to add more flags, please update the function addConfigFlags.

Auther interface
auth directory
configuration parser
authBackend.Get