Documentation ¶
Overview ¶
Package main shows how to use a dependency to check if a user is logged in using a special custom Go type `Authenticated`, which when, present on a controller's method or a field then it limits the visibility to "authenticated" users only.
The same result could be done through a middleware as well, however using a static type any person reads your code can see that an "X" controller or method should only be used by "authenticated" users.
Click to show internal directories.
Click to hide internal directories.