Package 'MolgenisAuth'

Title: 'OpenID Connect' Discovery and Authentication
Description: Discover 'OpenID Connect' endpoints and authenticate using device flow. Used by 'MOLGENIS' packages.
Authors: Fleur Kelpin [aut] (ORCID: <https://orcid.org/0000-0003-1527-5130>), Tommy de Boer [aut] (ORCID: <https://orcid.org/0000-0002-4492-7225>), Sido Haakma [aut] (ORCID: <https://orcid.org/0000-0003-1278-9144>), Mariska Slofstra [aut, cre] (ORCID: <https://orcid.org/0000-0002-0400-0468>), Tim Cadman [aut] (ORCID: <https://orcid.org/0000-0002-7682-5645>), MOLGENIS org [cph, fnd]
Maintainer: Mariska Slofstra <[email protected]>
License: GPL-3
Version: 1.0.1
Built: 2026-05-08 11:18:40 UTC
Source: https://github.com/molgenis/molgenis-r-auth

Help Index


Authenticate using device flow

Description

Get an ID token using the OpenIDConnect Device Flow.

Usage

device_flow_auth(endpoint, client_id, scopes = c("openid", "offline_access"))

Arguments

endpoint

An list with a device endpoint specified in it

client_id

The client ID for which the token should be obtained

scopes

the requested scopes, default to c("openid", "offline_access")

Value

The credentials retrieved from the token endpoint

Examples

## Not run: 
endpoint <- discover("https://auth.molgenis.org")
device_flow_auth(endpoint, "b396233b-cdb2-449e-ac5c-a0d28b38f791")

## End(Not run)

Discover OpenID Connect Endpoints

Description

Performs OpenID Connect discovery on an ID Provider.

Usage

discover(auth_server)

Arguments

auth_server

the server

Value

An list with the discovered endpoints.

Examples

## Not run: 
discover("https://auth.molgenis.org")
discover("https://accounts.google.com")

## End(Not run)