ssoc

package
v4.0.4 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2021 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Authorize

func Authorize(redirect string) (string, error)

Authorize return the sso authorize location with state

func CreateClient

func CreateClient(w http.ResponseWriter, body io.ReadCloser) error

func DeleteClient

func DeleteClient(w http.ResponseWriter, clientId string) error

func GetClient

func GetClient(w http.ResponseWriter, clientId string) error

func GetClients

func GetClients(w http.ResponseWriter, query url.Values) error

func InitSSO

func InitSSO()

func LogoutLocation

func LogoutLocation(redirect string) string

LogoutLocation return logout location

func UpdateClient

func UpdateClient(w http.ResponseWriter, clientId string, body io.ReadCloser) error

Types

type CallbackOutput

type CallbackOutput struct {
	Redirect    string       `json:"redirect"`
	AccessToken string       `json:"accessToken"`
	User        *models.User `json:"user"`
	Msg         string       `json:"msg"`
}

func Callback

func Callback(code, state string) (*CallbackOutput, error)

Callback 用 code 兑换 accessToken 以及 用户信息,

func (CallbackOutput) String

func (p CallbackOutput) String() string

Jump to

Keyboard shortcuts

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