https://github.com/molgenis/molgenis-r-auth
Discover and authenticate against an OpenID server from R
https://github.com/molgenis/molgenis-r-auth
jwt
Last synced: 4 months ago
JSON representation
Discover and authenticate against an OpenID server from R
- Host: GitHub
- URL: https://github.com/molgenis/molgenis-r-auth
- Owner: molgenis
- License: gpl-3.0
- Created: 2020-07-10T17:45:08.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-09-03T07:29:49.000Z (about 1 year ago)
- Last Synced: 2025-04-10T09:05:41.877Z (6 months ago)
- Topics: jwt
- Language: R
- Homepage: https://molgenis.github.io/molgenis-r-auth/
- Size: 236 KB
- Stars: 7
- Watchers: 10
- Forks: 3
- Open Issues: 3
-
Metadata Files:
- Readme: README.Rmd
- Changelog: NEWS.md
- License: LICENSE.md
Awesome Lists containing this project
- jimsghstars - molgenis/molgenis-r-auth - Discover and authenticate against an OpenID server from R (R)
README
---
title: "MolgenisAuth"
date: "`r Sys.Date()`"
output:
github_document
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```[](https://api.travis-ci.com/molgenis/molgenis-r-auth.svg?branch=master)
[](https://CRAN.R-project.org/package=MolgenisAuth)
[](https://app.codecov.io/gh/molgenis/molgenis-r-auth)The goal of MolgenisAuth is to discover and authenticate against an OpenID
Connect server. We have tested it using [Fusion Auth](https://fusionauth.io/).## Installation
You can install the released version of MolgenisAuth from [CRAN](https://CRAN.R-project.org) with:
```{r eval = FALSE}
install.packages("MolgenisAuth")
```And the development version from [GitHub](https://github.com/) with:
```{r eval=FALSE}
# install.packages("devtools")
devtools::install_github("molgenis/molgenis-r-auth")
```
## UsageTo discover endpoint URLs on an OpenID Connect authentication server:
```{r discover endpoint URLs}
library(MolgenisAuth)
endpoint <- discover("https://auth.molgenis.org")
endpoint
```Using this endpoint, you can then authenticate using the device flow.
This will open a browser window so you can authenticate with the
authentication server.
```{r}
credentials <- device_flow_auth(endpoint, "b396233b-cdb2-449e-ac5c-a0d28b38f791")
credentials$id_token
```## Support
We appreciate help, so do not be shy and file pull-requests for things that are
broken or file a bug report.