microsoftsso

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAccessToken

func GetAccessToken(code string) (string, error)

获取访问令牌

func GoAuth

func GoAuth(w http.ResponseWriter, r *http.Request)

func Init

func Init(config SSOConfig)

Types

type SSOConfig

type SSOConfig struct {
	ClientID     string
	ClientSecret string
	RedirectURI  string
	AuthUrl      string
	TokenUrl     string
}

type UserInfo

type UserInfo struct {
	ID          string `json:"id"`
	Username    string `json:"username"`
	DisplayName string `json:"displayName"`
	Mail        string `json:"mail"`
}

func GetUserName

func GetUserName(token string) (*UserInfo, error)

获取用户信息

Jump to

Keyboard shortcuts

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