cmd

package
v0.0.0-...-9f38d8c Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2024 License: AGPL-3.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RootCmd = &cobra.Command{
	Use:   "casdoor",
	Short: "A clean and straightforward command line interface for Casdoor.",
	Long: emoji.Sprintf(`:rocket: Casdoor CLI 

Casdoor CLI allows you to perform various operations using Casdoor's Public 
API such as:

- User management
- Permissions management
`),
}

Functions

func Execute

func Execute()

func OAuthHandler

func OAuthHandler(casdoorConfig *models.CasdoorConfig) ([]byte, error)

OAuthHandler handles the OAuth process for the given Casdoor configuration.

It takes a CasdoorConfig pointer as a parameter and returns a byte slice and an error.

func ParseOAuthResponse

func ParseOAuthResponse(data []byte) (*models.TokenData, error)

ParseOAuthResponse parses the OAuth response data into a TokenData struct.

Parameter:

data []byte - the OAuth response data to be parsed

Return:

*models.TokenData - the parsed TokenData struct
error - an error, if any, during the parsing process

Types

This section is empty.

Jump to

Keyboard shortcuts

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