mirror of
https://github.com/notherealmarco/WASAPhoto.git
synced 2025-05-05 20:32:35 +02:00
identity providers and bearerauth
This commit is contained in:
parent
5f3d4df33a
commit
626b7fa3e9
32 changed files with 1317 additions and 12 deletions
|
@ -8,6 +8,7 @@ package reqcontext
|
|||
|
||||
import (
|
||||
"github.com/gofrs/uuid"
|
||||
"github.com/notherealmarco/WASAPhoto/service/database"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
|
@ -18,4 +19,12 @@ type RequestContext struct {
|
|||
|
||||
// Logger is a custom field logger for the request
|
||||
Logger logrus.FieldLogger
|
||||
|
||||
Auth Authorization
|
||||
}
|
||||
|
||||
type Authorization interface {
|
||||
GetType() string
|
||||
Authorized(db database.AppDatabase) (bool, error)
|
||||
UserAuthorized(db database.AppDatabase, uid string) (bool, error)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue