rstudio / rscloud

Managing RStudio Cloud spaces with R
https://rstudio.github.io/rscloud
Other
22 stars 11 forks source link

Retrieve authorization state via whoami #12

Closed coatless closed 4 years ago

coatless commented 5 years ago

It would be great to see the login credentials active in the R session's .global environment, c.f.

https://github.com/rstudio/rscloud/blob/85b286847dbe30db19b09a4dde5dd38b1aa4b6f3/R/setup.R#L3

Something like:

rscloud_whoami()
# User: user@example.edu
# CLIENT_ID: 981....AFG
# CLIENT_SECRET: 11Z...GGA
# Hourly API Calls: 1/100
tareefk commented 5 years ago

What is the use case here? Are you thinking you are going to be connecting via different credentials?

coatless commented 5 years ago

More of a sanity check to verify user-specific setup and if rate limits come into play with the API a quick diagnostic tool.

tareefk commented 5 years ago

Got it, thanks.