SyntropyWeb.Api.TokenController (syntropy v0.3.0)

Copy Markdown

Summary

Functions

POST /api/tokens — create a scoped token. The plaintext appears in this response only.

DELETE /api/tokens/:id — deactivate a scoped token.

GET /api/tokens — list scoped tokens (admin only; digests, never plaintext).

Functions

create(conn, params)

@spec create(Plug.Conn.t(), map()) :: Plug.Conn.t()

POST /api/tokens — create a scoped token. The plaintext appears in this response only.

delete(conn, map)

@spec delete(Plug.Conn.t(), map()) :: Plug.Conn.t()

DELETE /api/tokens/:id — deactivate a scoped token.

index(conn, params)

@spec index(Plug.Conn.t(), map()) :: Plug.Conn.t()

GET /api/tokens — list scoped tokens (admin only; digests, never plaintext).