auth

package
v0.0.0-...-c9ffa05 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 28, 2018 License: MIT Imports: 3 Imported by: 2

Documentation

Overview

Package auth handles user management: creation, deletion, and authentication.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

func Delete(c *deis.Client, username string) error

Delete deletes a user.

func Login

func Login(c *deis.Client, username, password string) (string, error)

Login to the controller and get a token

func Passwd

func Passwd(c *deis.Client, username, password, newPassword string) error

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

func Regenerate(c *deis.Client, username string, all bool) (string, error)

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.

func Register

func Register(c *deis.Client, username, password, email string) error

Register a new user with the controller. If controller registration is set to administrators only, a valid administrative user token is required in the client.

func Whoami

func Whoami(c *deis.Client) (api.User, error)

Whoami retrives the user object for the authenticated user.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL