security

package module
v0.0.0-...-eb33cdb Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2023 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Overview

Package security provide basic data for security related information, such as user and roles and common http middleware for restricting request based on roles. Usually you do not need to install this package manually, security extensions should already have this package as their dependencies. Unless you're writing your own extension.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Authenticated

func Authenticated() func(next http.Handler) http.Handler

Authenticated is http middleware which filter out unauthenticated incoming request. Notes: This handler doesn't works alone, you need to use other security component to handle authentication and save the user info into the sdk principal package, such as: security-oidc.

func RolesAllowed

func RolesAllowed(r0 string, rn ...string) func(next http.Handler) http.Handler

RolesAllowed is http middleware which filter incoming request based on speficied roles againts user roles. Notes: This handler doesn't works alone, you need to use other security component to handle authentication and save the user info into the sdk principal package, such as: security-oidc.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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