credential: Base interface

This commit is contained in:
Armon Dadgar 2015-03-18 15:21:25 -07:00
parent 10a67592cd
commit b879c5aaf8
1 changed files with 16 additions and 0 deletions

16
credential/credential.go Normal file
View File

@ -0,0 +1,16 @@
package credential
import "github.com/hashicorp/vault/logical"
// Backend interface must be implemented for an authentication
// mechanism to be made available. Requests can flow through credential
// backends to be converted into a token. The logic of each backend is flexible,
// and this is allows for user/password, public/private key, and OAuth schemes
// to all be supported. The credential implementations must also be logical
// backends, allowing them to be mounted and manipulated like procfs.
type Backend interface {
logical.Backend
}
// Factory is the factory function to create a logical backend.
type Factory func(map[string]string) (Backend, error)