Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Configure ¶
func Configure(r *gin.Engine, app_url string, default_redirect string, stubs_on_unconfigured bool, check_middleware func(c *gin.Context), production bool)
Configure and set up the login SDK The check middleware may be nil, in which case a default is used. Otherwise should be a valid gin middleware, calling c.Next() if okay to proceed.
func ConfigureFull ¶ added in v1.3.1
func ConfigureFull( r *gin.Engine, app_url string, default_redirect string, user_function UserFunc, stubs_on_unconfigured bool, check_middleware func(c *gin.Context), production bool, )
Wraps the normal configure function, but also gives you access to change the User Function, which is called upon login. It is used to create or update a user. The check middleware may be nil, in which case a default is used. Otherwise should be a valid gin middleware, calling c.Next() if okay to proceed.
func EnsureLogin ¶
Ensure that a user is currently logged in. If redirectFail is set, then if not, the user is redirected.
func ErrorHandler ¶ added in v0.2.0
func ErrorHandler() gin.HandlerFunc
Types ¶
Click to show internal directories.
Click to hide internal directories.