package
0.0.0-20201019154204-5f7224491274
Repository: https://github.com/ramonmacias/go-auth-middleware.git
Documentation: pkg.go.dev

# Functions

AuthAPI is the middleware that will check for the authorization header and apply all the validations needed to let the user let in or answer back with the correct Unauthorized errors, the ValidForRefresh function is mandatory.
CookieAPI is the middleware that will check for the validness of the given token on the given cookie, this middleware will answer back with a valid refreshed token, expiring the token if needed or with the same cookie in the valid case.
GetSessionFromContext will take the authorized session shared on the http request.
RequestWithSessionContext will create a new request and will attach the session in the context of the request.

# Type aliases

ValidForRefresh is a function that can be used for give an extra context on the middleware about is the business layer accept this user as a valid user.