Sluby
REST APIAuth

The signed-in account.

The account id and display name, plus the provider, provider label and handle the browser signed in with, its role, every way it signs in (`sign_in`), and the session expiry. With AUTH_DISABLED it is the local dev account (`provider: "local"`, `auth_disabled: true`, `role: "admin"`).

GET
/api/v1/auth/me

The account id and display name, plus the provider, provider label and handle the browser signed in with, its role, every way it signs in (sign_in), and the session expiry. With AUTH_DISABLED it is the local dev account (provider: "local", auth_disabled: true, role: "admin").

Authorization

cookieAuth
cookiesluby_session<token>

Signed session cookie issued to the Studio at sign-in (email and password, GitHub, setup, or an invite or reset link).

Response Body

The signed-in account, or the local dev account.

application/json
  1. response
id*string

The account id.

Formatuuid
name*string

Display name.

username*string

The handle the session signed in with: the email for password, GitHub's login for github.

provider*|

How this session signed in: password, github, or local with AUTH_DISABLED.

provider_label*string|null
auth_disabled*boolean

True when the server runs with AUTH_DISABLED and this is the local dev account.

role*string

Admins also see deployment-wide operations data (the full system status, metrics and the whole reconciliation report) and manage members. Always admin for the local dev account, the one user of an AUTH_DISABLED server.

Value in"admin""member"
operator*booleanDeprecated

Use role. True when role is admin.

sign_in*array<>

Every way the account signs in.

expires_at*|
Formatdate-time
providerLabel?|Deprecated

Older spelling of provider_label, kept so clients written for 0.1.0 keep working.

authDisabled?booleanDeprecated

Older spelling of auth_disabled, kept so clients written for 0.1.0 keep working.

expiresAt?integerDeprecated

Older unix-seconds form of expires_at, kept so clients written for 0.1.0 keep working.

Example Request
curl -X GET 'https://sluby.example.com/api/v1/auth/me'
Example Response
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "name": "string",  "username": "string",  "provider": "string",  "provider_label": "string",  "auth_disabled": true,  "role": "admin",  "operator": true,  "sign_in": [    {      "provider": "string",      "username": "string"    }  ],  "expires_at": "2019-08-24T14:15:22Z",  "providerLabel": "string",  "authDisabled": true,  "expiresAt": 0}