To build a new authentication provider, you need to implement the Auther interface, 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:
Add it to auth
directory.
Add it to the configuration parser for the CLI.
Add it to the authBackend.Get
.
If you need to add more flags, please update the function addConfigFlags
.