Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom Backened #117

Open
markbiria opened this issue Jan 26, 2019 · 4 comments
Open

Custom Backened #117

markbiria opened this issue Jan 26, 2019 · 4 comments

Comments

@markbiria
Copy link

Hi

Can i add my own custom backend for example a database of username and password, to be authenticated against?

@magikstm
Copy link
Contributor

There are some options:

  1. Htpasswd (with a file possibly exported from DB)
  2. Httpupstream
  3. Writing your own backend

@markbiria
Copy link
Author

Thanks,

I've just realized that there is a backend interface that i can implement for my own backend.

type Backend interface {
	// Authenticate checks the username/password against the backend.
	// On success it returns true and a UserInfo object which has at least the username set.
	// If the credentials do not match, false is returned.
	// The error parameter is nil, unless a communication error with the backend occurred.
	Authenticate(username, password string) (bool, model.UserInfo, error)
}

@didasy
Copy link
Contributor

didasy commented Jan 31, 2019

@markbiria don't forget to make a PR after you've done 😛

@magikstm
Copy link
Contributor

@smancke I suggest closing this issue as it seems resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants