Documentation ¶
Index ¶
- Constants
- func Authorize(ctx *fiber.Ctx) error
- func Callback(ctx *fiber.Ctx) error
- func GenOAuthState(ctx *fiber.Ctx) (string, *common.Result)
- func GetOAuthState(ctx *fiber.Ctx) (string, *common.Result)
- func GetUser(token string) *common.Result
- func Middleware(ctx *fiber.Ctx) error
- type Config
- type User
Constants ¶
View Source
const SESSION_STATE_KEY = "oauthStateString"
Variables ¶
This section is empty.
Functions ¶
func GenOAuthState ¶
func GetOAuthState ¶
func Middleware ¶
func Middleware(ctx *fiber.Ctx) error
Types ¶
type User ¶
type User struct { AccessToken string `json:"AccessToken"` RefreshToken string `json:"RefreshToken"` ExpiresIn int `json:"ExpiresIn"` Scope string `json:"Scope"` Raw struct { ID string `json:"Id"` ClientID string `json:"ClientId"` Username string `json:"Username"` EMail string `json:"EMail"` Mobile string `json:"Mobile"` CreatedAt time.Time `json:"CreatedAt"` } `json:"UserData"` }
Click to show internal directories.
Click to hide internal directories.