middlewares

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2020 License: MPL-2.0, MPL-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Authorization

func Authorization(next http.HandlerFunc) http.HandlerFunc

Authorization has one of the most important security function for TRASA. It handles roles and permission for user specific to organization and sandbox crud operations between inter Ogranization. 1 - we extract request method 2 - we extract api endpoint from url path 3 - we extract user role and permissions 4 - we verify user role (based on group) to incoming request endpoint and method. 5 - we verify if the requested crud operation belongs to same organization. orgID derived from session ID is relevant source of truth here.

func Dumpster

func Dumpster(next http.HandlerFunc) http.HandlerFunc

func SCIMTokenValidator added in v1.1.4

func SCIMTokenValidator(next http.HandlerFunc) http.HandlerFunc

SCIMTokenValidator validates incoming authorization token for scim requests refer to handler GenerateSCIMAuthToken to check how the token is generated.

func SessionValidator

func SessionValidator(next http.HandlerFunc) http.HandlerFunc

SessionValidator is a middleware that checks for csrf tokens and session cookies

func SessionValidatorWS

func SessionValidatorWS(next func(params models.ConnectionParams, uc models.UserContext, ws *websocket.Conn)) http.HandlerFunc

SessionValidator is a middleware that checks for csrf tokens and session cookies

Types

type AuthMiddleware

type AuthMiddleware struct {
}

func (AuthMiddleware) Handler

func (am AuthMiddleware) Handler(next http.Handler) http.Handler

type Dumper

type Dumper struct {
}

func (Dumper) Handler

func (am Dumper) Handler(next http.Handler) http.Handler

type InAppTrail

type InAppTrail struct {
}

This middleware should be placed on outermost/topmost place

func (InAppTrail) Handler

func (iat InAppTrail) Handler(next http.Handler) http.Handler

type SCIMAuth added in v1.1.4

type SCIMAuth struct {
}

SCIMAuth handles authentication of SCIM api requests

func (SCIMAuth) Handler added in v1.1.4

func (sc SCIMAuth) Handler(next http.Handler) http.Handler

Jump to

Keyboard shortcuts

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