View Source NervesHubUserAPI.User (nerves_hub_user_api v0.9.0)

Manage NervesHub users

Path: /users

Link to this section 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.

Sign a user certificate for an existing user.

Link to this section Functions

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

Validate authentication of an existing user.

Verb: POST Path: /users/auth

Link to this function

login(email, password, note \\ nil)

View Source

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.

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

Returns information about the user.

Verb: GET Path: /users/me

Link to this function

register(username, email, password)

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

Register a new user.

Verb: POST Path: /users/register

Link to this function

sign(email, password, csr, description)

View Source
@spec sign(String.t(), String.t(), String.t(), String.t()) ::
  {:error, any()} | {:ok, any()}

Sign a user certificate for an existing user.

Verb: POST Path: /users/sign