auth

package
v0.32.0 Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Interceptor

type Interceptor struct {
	// contains filtered or unexported fields
}

Interceptor is an authentication interceptor.

func NewInterceptor

func NewInterceptor(ctx context.Context, rbacServerAddr, accessResource string) (*Interceptor, error)

NewInterceptor creates a new Interceptor.

func (*Interceptor) InterceptHTTPRequest added in v0.22.0

func (a *Interceptor) InterceptHTTPRequest(req *http.Request) (int, error)

InterceptHTTPRequest intercepts an HTTP request and returns an HTTP status code.

func (*Interceptor) Unary

Unary returns a unary server interceptor.

type UserInfo added in v0.23.0

type UserInfo struct {
	UserID         string
	OrganizationID string
}

UserInfo manages the user info.

func ExtractUserInfoFromContext added in v0.23.0

func ExtractUserInfoFromContext(ctx context.Context) (*UserInfo, bool)

ExtractUserInfoFromContext extracts the user info from the context.

Jump to

Keyboard shortcuts

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