auth

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const AdminUserRole = "admin"
View Source
const DefaultOrgID = "0000000"
View Source
const DefaultUserID = "0000000"

Variables

This section is empty.

Functions

func GetUserInfoMiddleware

func GetUserInfoMiddleware(next http.Handler) http.Handler

Fake auth Middleware handler to add username from headers to request context

func OrgIDFromContext

func OrgIDFromContext(ctx context.Context) string

func OrgIDToContext

func OrgIDToContext(ctx context.Context, orgID string) context.Context

func UserIDFromContext

func UserIDFromContext(ctx context.Context) string

func UserIDToContext

func UserIDToContext(ctx context.Context, userID string) context.Context

func UserRoleFromContext

func UserRoleFromContext(ctx context.Context) string

func UserRoleToContext

func UserRoleToContext(ctx context.Context, roleID string) context.Context

Types

This section is empty.

Jump to

Keyboard shortcuts

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