casdoor_cx

package
v0.0.0-...-f77605d Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: MulanPSL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrMissingJwtToken = errors.Unauthorized(reason, "JWT token is missing")
	ErrTokenInvalid    = errors.Unauthorized(reason, "Token is invalid")
	ErrTokenInvalid2   = errors.Unauthorized(reason, "22222 is invalid")
	ErrTokenClaim      = errors.Unauthorized(reason, "Token claim error")
	ErrWrongContext    = errors.Unauthorized(reason, "Wrong context for middleware")
)

Functions

func NewCasDoorClientConfig

func NewCasDoorClientConfig(clientConfig *CasDoorClientConfig) (*casdoorsdk.Client, error)

Types

type AuthKey

type AuthKey struct{}

type CasDoorClient

type CasDoorClient struct {
	Client *casdoorsdk.Client
}

func NewCasDoorClient

func NewCasDoorClient(clientConfig *CasDoorClientConfig) (*CasDoorClient, error)

func (*CasDoorClient) CasDoorJWT

func (c *CasDoorClient) CasDoorJWT() middleware.Middleware

func (*CasDoorClient) CustomerJWT

func (c *CasDoorClient) CustomerJWT() middleware.Middleware

func (*CasDoorClient) GetOAuthToken

func (c *CasDoorClient) GetOAuthToken(code, state string) *oauth2.Token

type CasDoorClientConfig

type CasDoorClientConfig struct {
	Endpoint         string
	ClientId         string
	ClientSecret     string
	Certificate      string
	CertificateName  string // 证书名字
	OrganizationName string
	ApplicationName  string
}

type Claims

type Claims *casdoorsdk.Claims

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳