auth

package
v0.0.0-...-a78f517 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2024 License: MIT Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetProviderIconBase64

func GetProviderIconBase64(provider string) string

func GetProviders

func GetProviders(conf *config.Config) []goth.Provider

func RegisterSocialUser

func RegisterSocialUser(dao *dao.Dao, u SocialUser) (entity.AuthIdentity, error)

func ResponseCallbackPage

func ResponseCallbackPage(c *fiber.Ctx, token string) error

Types

type AuthProviderInfo

type AuthProviderInfo struct {
	Name  string `json:"name" validate:"required"`
	Label string `json:"label" validate:"required"`
	Path  string `json:"path" validate:"optional"`
	Icon  string `json:"icon" validate:"required"`
}

func GetProviderInfo

func GetProviderInfo(conf *config.Config, providers []goth.Provider) []AuthProviderInfo

type SocialUser

type SocialUser struct {
	goth.User
	RemoteUID string
	Link      string
}

func GetSocialUser

func GetSocialUser(u goth.User) SocialUser

Directories

Path Synopsis
This package is adapted from the `github.com/markbates/goth/gothic` to work with the Fiber web framework.
This package is adapted from the `github.com/markbates/goth/gothic` to work with the Fiber web framework.

Jump to

Keyboard shortcuts

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