Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct { Port string VaultAddr string VaultToken string LdapHost string LdapAdmin string LdapPassword string Localhost bool }
API : Service configuration
func (API) Authenticate ¶
func (api API) Authenticate(w http.ResponseWriter, r *http.Request, p httprouter.Params)
Authenticate : authenticate directly with ldap
func (API) Authenticate2 ¶
func (api API) Authenticate2(w http.ResponseWriter, r *http.Request, p httprouter.Params)
Authenticate2 : authenticate the username/pass
type User ¶
type User struct { Username string `json:"username"` Customerno string `json:"customerno"` Message string `json:"message"` Success bool `json:"success"` Error error `json:"error"` }
User : The user data to be returned to the application
type VaultData ¶
type VaultData struct { Data struct { Customerno string `json:"customerno"` Password string `json:"password"` Username string `json:"username"` } `json:"data"` Metadata struct { CreatedTime time.Time `json:"created_time"` DeletionTime string `json:"deletion_time"` Destroyed bool `json:"destroyed"` Version int `json:"version"` } `json:"metadata"` }
VaultData : makes json payload usable
Click to show internal directories.
Click to hide internal directories.