login: Function to login to a specific backend

Description Usage Arguments Value Examples

View source: R/user.R

Description

Retrieves the bearer-token from the backend by sending user name and password to the backend. This step is usually also performed in the 'connect' step. But if you only connected to a back-end in order to explore the functionalities and want to compute something, then you need to log in afterwards.

Usage

1
2
3
4
5
6
7
8
login(
  user = NULL,
  password = NULL,
  login_type = NULL,
  provider = NULL,
  config = NULL,
  con = NULL
)

Arguments

user

the user name

password

the password

login_type

either NULL, 'basic' or 'oidc'. This refers to the login mechanism that shall be used. NULL disables authentication.

provider

provider object as obtained by 'list_oidc_providers()'

config

named list containing 'client_id' and 'sercret' or a path to the configuration file (type JSON)

con

connected back-end connection (optional) otherwise active_connection is used.

Value

a connected and authenticated back-end connection

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
# simple connection without login to maybe explore the capabilities of a back-end first
con = connect(host='http://example.openeo.org',version='1.0.0-rc.2')

login(user='user',password='password',login_type='basic', con=con)

# or alternatively the oidc login
login(login_type='oidc', provider=provider, config=config)

## End(Not run)

flahn/openeo-r-client documentation built on Sept. 18, 2020, 5:16 a.m.