Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 29 days 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 4 years ago)
- Default Branch: master
- Last Pushed: 2024-08-13T09:21:02.000Z (4 months ago)
- Last Synced: 2024-08-13T12:47:58.684Z (4 months ago)
- Topics: jwt
- Language: R
- Homepage: https://molgenis.github.io/molgenis-r-auth/
- Size: 236 KB
- Stars: 6
- Watchers: 12
- 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%"
)
```[![Travis build status](https://api.travis-ci.com/molgenis/molgenis-r-auth.svg?branch=master)](https://api.travis-ci.com/molgenis/molgenis-r-auth.svg?branch=master)
[![CRAN status](https://www.r-pkg.org/badges/version/MolgenisAuth)](https://CRAN.R-project.org/package=MolgenisAuth)
[![codecov](https://codecov.io/gh/molgenis/molgenis-r-auth/branch/master/graph/badge.svg?token=5Y96e0ULTk)](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.