renamed site directory to server
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"log/slog"
|
||||
"net/url"
|
||||
"time"
|
||||
|
||||
@@ -36,6 +37,7 @@ const (
|
||||
type (
|
||||
// Authenticator is used to authenticate our users.
|
||||
Authenticator struct {
|
||||
log *slog.Logger
|
||||
*oidc.Provider
|
||||
oauth2.Config
|
||||
db *pgxpool.Pool
|
||||
@@ -59,7 +61,11 @@ type (
|
||||
)
|
||||
|
||||
// New instantiates the *Authenticator.
|
||||
func New(ctx context.Context, db *pgxpool.Pool) (*Authenticator, error) {
|
||||
func New(
|
||||
ctx context.Context,
|
||||
db *pgxpool.Pool,
|
||||
logger *slog.Logger,
|
||||
) (*Authenticator, error) {
|
||||
provider, err := oidc.NewProvider(
|
||||
ctx,
|
||||
"https://"+AUTH0_DOMAIN+"/",
|
||||
@@ -69,6 +75,7 @@ func New(ctx context.Context, db *pgxpool.Pool) (*Authenticator, error) {
|
||||
}
|
||||
|
||||
return &Authenticator{
|
||||
log: logger,
|
||||
Provider: provider,
|
||||
Config: oauth2.Config{
|
||||
ClientID: AUTH0_CLIENT_ID,
|
||||
|
||||
Reference in New Issue
Block a user