Skip to contents

To sign the hrefs with your token you need to store it in an environment variable in BDC_ACCESS_KEYor use acess_token parameter.

Usage

sign_bdc(access_token = NULL, ...)

Arguments

access_token

a character with the access token parameter to access Brazil Data Cube assets.

...

additional parameters can be supplied to the GET function of the httr package.

Value

a function that signs each item assets.

Examples

if (FALSE) {
 # STACItemCollection object
 stac_obj <- stac("https://brazildatacube.dpi.inpe.br/stac/") %>%
   stac_search(collections = "CB4_64_16D_STK-1",
               datetime = "2019-06-01/2019-08-01") %>%
   stac_search() %>%
   get_request()

 # signing each item href
 stac_obj %>% items_sign(sign_fn = sign_bdc(access_token = "123"))
}