Versions in this module Expand all Collapse all v1 v1.13.0 Jan 19, 2026 v1.12.0 Jan 19, 2026 Changes in this version + func InitAuthentication(auth *core.Authentication) + func Token() (string, error) + type Context struct + Config any + Gin *gin.Context + Log *slog.Logger + Session *UserSession + Token string + func (c *Context) BindParamsFromBody(obj any) (err error) + func (c *Context) BindParamsFromQuery(obj any) (err error) + func (c *Context) GetCodeFromUrl() string + func (c *Context) GetId2FromUrl() (uint, error) + func (c *Context) GetIdFromUrl() (uint, error) + func (c *Context) GetPagingParams() (offset int, limit int, errV error) + func (c *Context) GetParamAsBool(name string, defValue bool) (bool, error) + func (c *Context) GetParamAsInt(name string, defValue int) (int, error) + func (c *Context) GetParamAsString(name string, defValue string) string + func (c *Context) ReturnData(contentType string, data []byte) error + func (c *Context) ReturnError(err error) + func (c *Context) ReturnList(result any, offset int, limit int, size int) error + func (c *Context) ReturnObject(data any) error + type OidcController struct + func NewOidcController(authority string, client *http.Client, logger *slog.Logger, config any) *OidcController + func (oc *OidcController) Secure(h RestService, roles []role.Role) func(c *gin.Context) + type RestContext struct + type RestService func(c *Context) + type TokenResponse struct + AccessToken string + ExpiresIn int + RefreshToken string + Scope string + TokenType string + type UserSession struct + Email string + Expiry time.Time + IssuedAt time.Time + Name string + OnBehalfOf string + Roles map[role.Role]any + SessionID string + Surname string + Username string + func (us *UserSession) IsAdmin() bool + func (us *UserSession) IsUserInRole(roles []role.Role) bool