Compare commits
1 Commits
hws/v0.2.2
...
hwsauth/v0
| Author | SHA1 | Date | |
|---|---|---|---|
| 7c91cbb08a |
@@ -1,4 +1,4 @@
|
||||
# HWSAuth - v0.3.2
|
||||
# HWSAuth - v0.3.3
|
||||
|
||||
JWT-based authentication middleware for the HWS web framework.
|
||||
|
||||
@@ -32,6 +32,7 @@ import (
|
||||
"net/http"
|
||||
"git.haelnorr.com/h/golib/hwsauth"
|
||||
"git.haelnorr.com/h/golib/hws"
|
||||
"git.haelnorr.com/h/golib/hlog"
|
||||
)
|
||||
|
||||
type User struct {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package hwsauth
|
||||
|
||||
import (
|
||||
"git.haelnorr.com/h/golib/hlog"
|
||||
"git.haelnorr.com/h/golib/hws"
|
||||
"git.haelnorr.com/h/golib/jwt"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/rs/zerolog"
|
||||
)
|
||||
|
||||
type Authenticator[T Model, TX DBTransaction] struct {
|
||||
@@ -12,7 +12,7 @@ type Authenticator[T Model, TX DBTransaction] struct {
|
||||
load LoadFunc[T, TX]
|
||||
beginTx BeginTX
|
||||
ignoredPaths []string
|
||||
logger *zerolog.Logger
|
||||
logger *hlog.Logger
|
||||
server *hws.Server
|
||||
errorPage hws.ErrorPageFunc
|
||||
SSL bool // Use SSL for JWT tokens. Default true
|
||||
@@ -28,7 +28,7 @@ func NewAuthenticator[T Model, TX DBTransaction](
|
||||
load LoadFunc[T, TX],
|
||||
server *hws.Server,
|
||||
beginTx BeginTX,
|
||||
logger *zerolog.Logger,
|
||||
logger *hlog.Logger,
|
||||
errorPage hws.ErrorPageFunc,
|
||||
) (*Authenticator[T, TX], error) {
|
||||
if load == nil {
|
||||
|
||||
@@ -8,11 +8,11 @@ require (
|
||||
git.haelnorr.com/h/golib/hws v0.2.0
|
||||
git.haelnorr.com/h/golib/jwt v0.10.0
|
||||
github.com/pkg/errors v0.9.1
|
||||
github.com/rs/zerolog v1.34.0
|
||||
git.haelnorr.com/h/golib/hlog v0.9.1
|
||||
)
|
||||
|
||||
require (
|
||||
git.haelnorr.com/h/golib/hlog v0.9.1 // indirect
|
||||
github.com/rs/zerolog v1.34.0 // indirect
|
||||
github.com/go-logr/logr v1.4.3 // indirect
|
||||
github.com/golang-jwt/jwt v3.2.2+incompatible // indirect
|
||||
github.com/google/uuid v1.6.0 // indirect
|
||||
|
||||
Reference in New Issue
Block a user