MyNixOS website logo
Description

'OpenID Connect' Discovery and Authentication.

Discover 'OpenID Connect' endpoints and authenticate using device flow. Used by 'MOLGENIS' packages.

MolgenisAuth

2020-10-31

Travis build status CRANstatus codecov

The goal of MolgenisAuth is to discover and authenticate against an OpenID Connect server. We have tested it using Fusion Auth.

Installation

You can install the released version of MolgenisAuth from CRAN with:

install.packages("MolgenisAuth")

And the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("molgenis/molgenis-r-auth")

Usage

To discover endpoint URLs on an OpenID Connect authentication server:

library(MolgenisAuth)
endpoint <- discover("https://auth.molgenis.org")
endpoint
#> <oauth_endpoint>
#>  authorize: https://auth.molgenis.org/oauth2/authorize
#>  access:    https://auth.molgenis.org/oauth2/token
#>  user:      https://auth.molgenis.org/oauth2/userinfo
#>  device:    https://auth.molgenis.org/oauth2/device_authorize
#>  logout:    https://auth.molgenis.org/oauth2/logout

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.

credentials <- device_flow_auth(endpoint, "b396233b-cdb2-449e-ac5c-a0d28b38f791")
credentials$id_token
#> [1] "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IlcwbmltejhpYU9DLW16OXNaTVRiVzRfbFdMMCJ9.eyJhdWQiOiJiMzk2MjMzYi1jZGIyLTQ0OWUtYWM1Yy1hMGQyOGIzOGY3OTEiLCJleHAiOjE2MDQxNjg5MDksImlhdCI6MTYwNDE2NTMwOSwiaXNzIjoiaHR0cHM6Ly9hdXRoLm1vbGdlbmlzLm9yZyIsInN1YiI6ImQ4OTk1OTc2LWU4ZDgtNDM5MC04MzliLTAwN2EzODJmYzEyYiIsImp0aSI6IjcwMjQ4M2VkLTY1ZjYtNDhiNy04ZDU2LTZmNDMzN2FlOTA3ZiIsImF1dGhlbnRpY2F0aW9uVHlwZSI6IlBBU1NXT1JEIiwiZW1haWwiOiJmLmtlbHBpbkB1bWNnLm5sIiwiZW1haWxfdmVyaWZpZWQiOnRydWUsImF0X2hhc2giOiJOV0pFQzZNNjAyRUpWQ0h0eHcxbGR3IiwiYXBwbGljYXRpb25JZCI6ImIzOTYyMzNiLWNkYjItNDQ5ZS1hYzVjLWEwZDI4YjM4Zjc5MSIsInJvbGVzIjpbIlNVIl0sInBvbGljeSI6InJlYWR3cml0ZSJ9.fJyj1hBx90HVKuCf5dGmfiRsnPo7gozj2xoZnJUmZbBLpuQnG5hdvMXhcTcgh6kJUy0ozw_tsSdOAivHxxREnN42UnVqNLj5s9cUk9-E75FgfZQnyWkHcosdlOgiw7vD5bLGq4Ma8VZTh98w8UsjTM1zhXJRdKWSZj9YH_qtmXkM4x-JW-IMeWVJQ7UOgXr_lcSUQFEMkwdkJcgQdZCxqQ4aonyKol3LMTnj_nc1XM0Hc1Um1ihD85h4NQ4XEDlP_z261xu7jAxgIpEaD5Rh6_2aWpfaNH8fSk-wDzZf69f_Vc44f5hkFrXeX6q-1FqJuxl5moJIc_QurGvtPdI9vg"

Support

We appreciate help, so do not be shy and file pull-requests for things that are broken or file a bug report.

Metadata

Version

0.0.25

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows