tryAuthenticate: Try authentication with Phenotype Database

Description Usage Arguments Value Examples

Description

This function is used in Shiny to try and authenticate a login attempt to the Phenotype Foundation Database using an API key (Shared key). If the authentication fails this function returns text in HTML format with the css-style stripped so that it can safely be displayed in the Shiny app.

Usage

1
tryAuthenticate(user, pass, skey)

Arguments

user

Phenotype database username

pass

Password

skey

Shared-key or API key. Can be found in your Phenotype Db profile

Value

If authentication is succes then return TRUE. Otherwise return error as HTML

Examples

1
2
3
4
5
6
user <- "lodewic.vantwillert"
pass <- "wrongPassw0rd" # Be careful when using your own correct credentials like this!
skey <- "25c92be1-234b-4b44-8c94-f94bb4cd7326"

# Raises an error and outputs HTML to be displayed in a Shiny app
tryAuthenticate(user = user, pass = pass, skey = skey)

Lodewic/accomodation-recommendation documentation built on Oct. 27, 2018, 12:12 a.m.