authenticate_user: authenticate a user for a Rook request

View source: R/authenticate_user.R

authenticate_userR Documentation

authenticate a user for a Rook request

Description

This is an app used by the Rook server launched by dataServer Params are passed as a url-encoded field named 'json' in the http POST request. The return value is a JSON-formatted string

Usage

authenticate_user(env)

Arguments

env

Rook request environment

Value

a JSON list with these items:

  • token character scalar token used in subsequent API calls

  • expiry numeric timestamp at which token expires

  • userID integer user ID of user at motus

  • projects list of projects user has access to; indexed by integer projectID, values are project names

  • receivers FIXME: will be list of receivers user has access to

if the user is authorized. Otherwise, return a JSON list with a single item called "error".

Note

This is simply a convenience wrapper around


MotusWTS/motusServer documentation built on Dec. 3, 2024, 10:47 a.m.