auth

package
v0.0.0-...-7404c28 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package auth NOTES

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthService

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

AuthService defines auth related operations.

func New

func New(cache *lcache.Cache) *AuthService

New initialize the auth service instance.

func (*AuthService) Authorize

func (as *AuthService) Authorize(kt *kit.Kit, res *meta.ResourceAttribute) (bool, error)

Authorize if user has permission to the bscp resource.

func (*AuthService) CanMatchCI

func (as *AuthService) CanMatchCI(kt *kit.Kit, bizID uint32,
	app string, token string, path string, name string) (bool, error)

CanMatchCI if credential can match the config item.

func (*AuthService) GetCred

func (as *AuthService) GetCred(kt *kit.Kit, bizID uint32, token string) (*types.CredentialCache, error)

GetCred 获取凭证配置

Jump to

Keyboard shortcuts

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