package
1.10.57
Repository: https://github.com/neicnordic/sda-download.git
Documentation: pkg.go.dev

# README

Middlewares

  • The default middleware is TokenMiddleware, which expects an access token, that can be sent to AAI in return for GA4GH visas.
  • One may create custom middlewares in this middleware package, and register them to the availableMiddlewares in config.go, and adding a case for them in main.go.
  • A middleware for runtime can then be selected with the app.middleware config.
  • For custom middlewares, it is important, that they use the storeDatasets function available in middleware.go to set the permissions for accessing data.

# Functions

TokenMiddleware performs access token verification and validation JWTs are verified and validated by the app, opaque tokens are sent to AAI for verification Successful auth results in list of authorised datasets.

# Variables

GetCacheFromContext is a helper function that endpoints can use to get data stored to the *current* request context (not the session storage).