authmiddleware

package
v0.0.0-...-599ae38 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

* Copyright FMR LLC <opensource@fidelity.com> * * SPDX-License-Identifier: Apache

* Copyright FMR LLC <opensource@fidelity.com> * * SPDX-License-Identifier: Apache

Index

Constants

View Source
const RolePrefix string = "/theliv/roles/"
View Source
const UIDPrefix string = "/theliv/uids/"
View Source
const URLPrefix string = "/theliv-api/v1"

Variables

View Source
var ErrNotThisAuth = errors.New("not this Auth method")

Functions

func CleanString

func CleanString(s string) string

remove blank and line-breaks from string

func GetADgroups

func GetADgroups(r *http.Request, id string) ([]string, error)

func GetUser

func GetUser(r *http.Request) (*rbac.User, error)

func KeyMatch

func KeyMatch(key1 string, key2 string) bool

KeyMatch determines whether key1 matches the pattern of key2 (similar to RESTful path), key2 can contain a *. For example, "/foo/bar" matches "/foo/*" Ref: https://github.com/casbin/casbin/blob/master/util/builtin_operators.go

func StartAuth

func StartAuth(handler http.Handler) http.Handler

Types

This section is empty.

Jump to

Keyboard shortcuts

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