middleware

package
v0.0.0-...-8f202a6 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthMiddleware

type AuthMiddleware struct {
	// contains filtered or unexported fields
}

func NewAuthMiddleware

func NewAuthMiddleware(usecase domain.AuthUsecase) *AuthMiddleware

func (*AuthMiddleware) HasAbility

func (m *AuthMiddleware) HasAbility(ability string) fiber.Handler

HasAbility checks if the user has the required ability

func (*AuthMiddleware) HasAllAbilities

func (m *AuthMiddleware) HasAllAbilities(abilities ...string) fiber.Handler

HasAllAbilities checks if the user has all of the required abilities

func (*AuthMiddleware) HasAnyAbility

func (m *AuthMiddleware) HasAnyAbility(abilities ...string) fiber.Handler

HasAnyAbility checks if the user has any of the required abilities

func (*AuthMiddleware) Protected

func (m *AuthMiddleware) Protected() fiber.Handler

Protected validates the token and allows access if valid

Jump to

Keyboard shortcuts

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