auth

package
v0.1.21 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ScopeProtected string = "PROTECTED"
	ScopePublic    string = "PUBLIC"
)

Variables

This section is empty.

Functions

func ExposeResourceInfo

func ExposeResourceInfo(res []Resource, extraEndpoints ...Endpoint)

Create endpoint to expose resources and endpoint paths to be collected by user-vault.

func ServeResourceInfo

func ServeResourceInfo(extraEndpoints ...Endpoint) func(inb *miso.Inbound) (any, error)

Types

type Endpoint

type Endpoint struct {
	Type    string `json:"type" desc:"access scope type: PROTECTED/PUBLIC"`
	Url     string `json:"url" desc:"endpoint url"`
	Group   string `json:"group" desc:"app name"`
	Desc    string `json:"desc" desc:"description of the endpoint"`
	ResCode string `json:"resCode" desc:"resource code"`
	Method  string `json:"method" desc:"http method"`
}

type Resource

type Resource struct {
	Name string `json:"name" desc:"resource name"`
	Code string `json:"code" desc:"resource code, unique identifier"`
}

type ResourceInfoRes

type ResourceInfoRes struct {
	Resources []Resource
	Paths     []Endpoint
}

Jump to

Keyboard shortcuts

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