I have created a sample function using plumber
package.
#* @get /tags
printmyname <- function(x) print(x)
When I run the following procedure.
library(plumber)
r <- plumb("plumber_Usman2.R")
r$run(host="0.0.0.0",port=8000)
An API is exposed on my local host which I can access using the host of my R server
.
Something like
http://host:8000/tags?x="This design looks bad, please fix it"
My Question is, since the API is open and can be openly access by anyone with the link, I want to secure it using Oauth. I have been doing research but couldn't come across anything. I would be thankful if someone can guide me in this regards with either plumber
or any other package which can secure my API.
Is it possible?