bkpaas

package
v0.0.0-...-d930fad Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package bkpaas provides bkpaas auth client.

Index

Constants

View Source
const (
	// BKLoginProvider 蓝鲸内部统一登入
	BKLoginProvider = "BK_LOGIN"
	// BKPaaSProvider 外部统一登入, 可使用主域名或者ESB查询
	BKPaaSProvider = "BK_PAAS"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthLoginClient

type AuthLoginClient interface {
	GetLoginCredentialFromCookies(r *http.Request) (*LoginCredential, error)
	GetUserInfoByToken(ctx context.Context, host, uid, token string) (string, error)
	BuildLoginRedirectURL(r *http.Request, webHost string) string
	BuildLoginURL(r *http.Request) (string, string)
}

AuthLoginClient 登入鉴权

func NewAuthLoginClient

func NewAuthLoginClient(conf *cc.LoginAuthSettings) AuthLoginClient

NewAuthLoginClient init client

type LoginCredential

type LoginCredential struct {
	UID   string
	Token string
}

LoginCredential uid/token for grpc auth

Jump to

Keyboard shortcuts

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