View Source NervesHubCLI.API.User (nerves_hub_cli v2.1.0)

Manage NervesHub users

Path: /users

Summary

Functions

Validate authentication of an existing user.

Validate authentication of a user and create an access token for future use

Returns information about the user.

Functions

auth(email, password)

@spec auth(String.t(), String.t()) :: {:error, any()} | {:ok, any()}

Validate authentication of an existing user.

Verb: POST Path: /users/auth

login(email, password, note \\ nil)

Validate authentication of a user and create an access token for future use

Verb: POST Path: /users/login

A note is required for the generated token. Defaults to the client hostname if not supplied.

me(auth)

@spec me(NervesHubCLI.API.Auth.t()) :: {:error, any()} | {:ok, any()}

Returns information about the user.

Verb: GET Path: /users/me

register(username, email, password)

@spec register(String.t(), String.t(), String.t()) :: {:error, any()} | {:ok, any()}

Register a new user.

Verb: POST Path: /users/register