server

package
v0.0.0-...-375a88f Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2025 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CallbackHandler

func CallbackHandler(auth *OIDCProvider, postLoginRedirectURL string) gin.HandlerFunc

func IsAuthenticatedMiddleware

func IsAuthenticatedMiddleware(ctx *gin.Context)

func LoginHandler

func LoginHandler(auth *OIDCProvider) gin.HandlerFunc

func LogoutHandler

func LogoutHandler(auth *OIDCProvider) gin.HandlerFunc

func OpenDB

func OpenDB(ctx context.Context, mysqlUser, mysqlPassword, mysqlServer, mysqlPort, mysqlDatabase string) (db, error)

OpenDB creates a DB connection and performs all migrations.

Types

type GecoAPIConfig

type GecoAPIConfig struct {
	LanID                 string
	UserstatusEndpointFmt string
}

type OIDCProvider

type OIDCProvider struct {
	*oidc.Provider
	oauth2.Config
	// contains filtered or unexported fields
}

func NewOIDCProvider

func NewOIDCProvider(log zerolog.Logger, issuer, redirectURL, clientID, clientSecret string) (*OIDCProvider, error)

type Server

type Server struct {
	Log           zerolog.Logger
	DB            db
	OIDCProvider  *OIDCProvider
	GecoAPIConfig *GecoAPIConfig
	SessionSecret string
}

Server is the server struct

func (*Server) ListenAndServe

func (s *Server) ListenAndServe(listen string) error

ListenAndServe sets up the HTTP server and starts listening

Jump to

Keyboard shortcuts

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