Documentation ¶
Overview ¶
Package auth handles user management: creation, deletion, and authentication.
Index ¶
- func Delete(c *deis.Client, username string) error
- func Login(c *deis.Client, username, password string) (string, error)
- func Passwd(c *deis.Client, username, password, newPassword string) error
- func Regenerate(c *deis.Client, username string, all bool) (string, error)
- func Register(c *deis.Client, username, password, email string) error
- func Whoami(c *deis.Client) (api.User, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Passwd ¶
Passwd changes a user's password.
If username if an empty string, change the password of the client's user.
If username is set, change the password of another user and do not require their password. This requires administrative privileges.
func Regenerate ¶
Regenerate auth tokens. This invalidates existing tokens, and if targeting a specific user returns a new token.
If username is an empty string and all is false, this regenerates the client user's token and will return a new token. Make sure to update the client token with this new token to avoid authentication errors.
If username is set and all is false, this will regenerate that user's token and return a new token. If not targeting yourself, regenerate requires administrative privileges.
If all is true, this will regenerate every user's token. This requires administrative privileges.
Types ¶
This section is empty.