mirror of
https://github.com/notherealmarco/WASAPhoto.git
synced 2025-05-05 12:22:35 +02:00
Improve comments and code readability
This commit is contained in:
parent
f6ad6db2f7
commit
3de158e5a5
19 changed files with 84 additions and 43 deletions
|
@ -11,9 +11,17 @@ const (
|
|||
USER_NOT_FOUND = 3
|
||||
)
|
||||
|
||||
// Authorization is the interface for an authorization provider
|
||||
type Authorization interface {
|
||||
// Returns the type of the authorization provider
|
||||
GetType() string
|
||||
|
||||
// Returns the ID of the currently logged in user
|
||||
GetUserID() string
|
||||
|
||||
// Checks if the token is valid
|
||||
Authorized(db database.AppDatabase) (AuthStatus, error)
|
||||
|
||||
// Checks if the given user and the currently logged in user are the same user
|
||||
UserAuthorized(db database.AppDatabase, uid string) (AuthStatus, error)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue