auth

package
v0.0.1-4 Latest Latest
Warning

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

Go to latest
Published: Mar 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 AuthField

type AuthField string
const PipAuthAdmin AuthField = "admin"
const PipAuthRoles AuthField = "roles"
const PipAuthUser AuthField = "user"
const PipAuthUserId AuthField = "user_id"

type BasicAuthorizer

type BasicAuthorizer struct {
}

func (*BasicAuthorizer) Anybody

func (c *BasicAuthorizer) Anybody() func(res http.ResponseWriter, req *http.Request, next http.HandlerFunc)

func (*BasicAuthorizer) Signed

func (c *BasicAuthorizer) Signed() func(res http.ResponseWriter, req *http.Request, next http.HandlerFunc)

type OwnerAuthorizer

type OwnerAuthorizer struct {
}

func (*OwnerAuthorizer) Owner

func (c *OwnerAuthorizer) Owner(idParam string) func(res http.ResponseWriter, req *http.Request, next http.HandlerFunc)

func (*OwnerAuthorizer) OwnerOrAdmin

func (c *OwnerAuthorizer) OwnerOrAdmin(idParam string) func(res http.ResponseWriter, req *http.Request, next http.HandlerFunc)

type RoleAuthorizer

type RoleAuthorizer struct {
}

func (*RoleAuthorizer) Admin

func (c *RoleAuthorizer) Admin() func(res http.ResponseWriter, req *http.Request, next http.HandlerFunc)

func (*RoleAuthorizer) UserInRole

func (c *RoleAuthorizer) UserInRole(role string) func(res http.ResponseWriter, req *http.Request, next http.HandlerFunc)

func (*RoleAuthorizer) UserInRoles

func (c *RoleAuthorizer) UserInRoles(roles []string) func(res http.ResponseWriter, req *http.Request, next http.HandlerFunc)

Jump to

Keyboard shortcuts

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