feat: initial commit

This commit is contained in:
2025-06-10 21:09:58 +02:00
commit 1fb753469e
84 changed files with 3912 additions and 0 deletions

View File

@ -0,0 +1,33 @@
package auth
type Options struct {
Providers []Provider
SessionName string
}
type OptionFunc func(opts *Options)
func NewOptions(funcs ...OptionFunc) *Options {
opts := &Options{
Providers: make([]Provider, 0),
SessionName: "KOUIZ_auth",
}
for _, fn := range funcs {
fn(opts)
}
return opts
}
func WithProviders(providers ...Provider) OptionFunc {
return func(opts *Options) {
opts.Providers = providers
}
}
func WithSessionName(sessionName string) OptionFunc {
return func(opts *Options) {
opts.SessionName = sessionName
}
}