auth

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2025 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AccessTokenCookieName string = "access_token"

Functions

func AuthCallbackController

func AuthCallbackController(c *fiber.Ctx) error

func InitializeAuth

func InitializeAuth(context context.Context, authProviderUrl string, redirectUrl string)

func LoginController

func LoginController(c *fiber.Ctx) error

func LogoutController

func LogoutController(c *fiber.Ctx) error

func VerifyToken

func VerifyToken(ctx context.Context, tokenString string) (*jwt.Token, error)

Types

type Config

type Config struct {
	BaseUri     string
	LoginConfig oauth2.Config
}
var AuthConfig Config

func BuildAuthConfig

func BuildAuthConfig(context context.Context, clientID string, authProviderUrl string, redirectUrl string) *Config

TODO: Don't panic

type State

type State struct {
	CameFrom string `json:"came_from"`
}

func ParseState

func ParseState(param string) (*State, string, error)

func (State) Encode

func (state State) Encode(nonce string) (string, error)

Jump to

Keyboard shortcuts

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