auth

package
v0.0.0-...-117299a Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2018 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cancel

func Cancel(user model.User)

Cancel executes `deis auth:cancel` as the specified user.

func CancelAdmin

func CancelAdmin()

CancelAdmin deletes the admin user that was created to facilitate the tests.

func Login

func Login(user model.User)

Login executes `deis auth:login` as the specified user. In the process, it creates the a corresponding profile that contains the user's authentication token. Re-use of this profile is for most other actions is what permits multiple test users to act in parallel without impacting one another.

func Logout

func Logout(user model.User)

Logout executes `deis auth:logout` as the specified user.

func Regenerate

func Regenerate(user model.User)

Regenerate executes `deis auth:regenerate` as the specified user.

func Register

func Register() model.User

Register executes `deis auth:register --login=false` using a randomized username and returns a model.User. The 'login' flag is set to false during registration because otherwise the newly registered user's configuration will be automatically written to the file used to register -- which in this case is the admin user's. Since we don't want to overwrite the admin user's configuration, we log the new user in separately.

func RegisterAdmin

func RegisterAdmin()

RegisterAdmin executes `deis auth:register`, using hard-coded username, password, and email address. When this is executed, it is executed in hopes of registering Workflow's FIRST user, which will automatically have admin permissions. If this should fail, the function proceeds with logging in using those same hard-coded credentials, in the hopes that the reason for the failure is that such an account already exists, having been created by a previous execution of the tests.

func RegisterAndLogin

func RegisterAndLogin() model.User

RegisterAndLogin registers a user using a randomized username and then logs in as the registered user.

func Whoami

func Whoami(user model.User)

Whoami executes `deis auth:whoami` as the specified user.

func WhoamiAll

func WhoamiAll(user model.User)

Types

This section is empty.

Jump to

Keyboard shortcuts

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