middleware

package
v4.0.0-release+incompa... Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 13, 2018 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package middleware handles authentication and access right to the app.

User is checked on every endpoint or page load to make sure the user's password has not changed, the user's account is active, and if the user's session is still active. This then extends a user's session if the user is valid so that the user is "auto logged in" to the app upon loading it.

Access rights determine what elements of the GUI the user can see and interact with as well as limits usage of certain endpoints.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddCards

func AddCards(next http.Handler) http.Handler

AddCards checks if the user is allowed to add credit cards to the app

func Administrator

func Administrator(next http.Handler) http.Handler

Administrator checks if the user is an administrator to the app this allows for adding/removing/changing other users also allows for changing the data that shows up on the receipt

func Auth

func Auth(next http.Handler) http.Handler

Auth checks if a user is logged in and is allowed access to the app this is done on every page load and every endpoint

func ChargeCards

func ChargeCards(next http.Handler) http.Handler

ChargeCards checks if the user is allowed to charge credit cards

func RemoveCards

func RemoveCards(next http.Handler) http.Handler

RemoveCards checks if the user is allowed to remove credit cards from the app

func ViewReports

func ViewReports(next http.Handler) http.Handler

ViewReports checks if the user is allowed to view the charge & refunds reports

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL