Title: 'OpenID Connect' Discovery and Authentication
Description: Discover 'OpenID Connect' endpoints and authenticate using device flow. Used by 'MOLGENIS' packages.
Version: 1.0.0
Maintainer: Mariska Slofstra <m.k.slofstra@umcg.nl>
Imports: urltools (≥ 1.7.0), httr2(≥ 1.0.1), assertthat
Depends: R (≥ 4.1.0)
URL: https://github.com/molgenis/molgenis-r-auth/, https://molgenis.github.io/molgenis-r-auth/
BugReports: https://github.com/molgenis/molgenis-r-auth/issues/
License: GPL-3
Encoding: UTF-8
RoxygenNote: 7.3.2
Suggests: testthat (≥ 3.2.0), mockery
NeedsCompilation: no
Packaged: 2025-07-21 13:19:23 UTC; tcadman
Author: Fleur Kelpin ORCID iD [aut], Tommy de Boer ORCID iD [aut], Sido Haakma ORCID iD [aut], Mariska Slofstra ORCID iD [aut, cre], Tim Cadman ORCID iD [aut], MOLGENIS org [cph, fnd]
Repository: CRAN
Date/Publication: 2025-07-21 13:52:08 UTC

MolgenisAuth: 'OpenID Connect' Discovery and Authentication

Description

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

Author(s)

Maintainer: Mariska Slofstra m.k.slofstra@umcg.nl (ORCID)

Authors:

Other contributors:

See Also

Useful links:


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)