Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var GetCacheFromContext = func(c *gin.Context) session.Cache { var cache session.Cache cached, exists := c.Get(requestContextKey) if exists { cache = cached.(session.Cache) } log.Debugf("returning %v from request context", cached) return cache }
GetCacheFromContext is a helper function that endpoints can use to get data stored to the *current* request context (not the session storage). The request context was populated by the middleware, which in turn uses the session storage.
Functions ¶
func TokenMiddleware ¶
func TokenMiddleware() gin.HandlerFunc
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. The datasets are stored into a session cache for subsequent requests, and also to the current request context for use in the endpoints.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.