add auth to /uploads
This commit is contained in:
parent
fbd23fe2cf
commit
a3312ef6f8
4 changed files with 31 additions and 6 deletions
|
@ -1,6 +1,10 @@
|
|||
package auth
|
||||
|
||||
import "time"
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/golang-jwt/jwt/v5"
|
||||
)
|
||||
|
||||
type TokenResponse struct {
|
||||
AccessToken string `json:"access_token"`
|
||||
|
@ -28,3 +32,9 @@ type ExchangeCodeRequest struct {
|
|||
Code string `json:"code"`
|
||||
RedirectUri string `json:"redirect_uri"`
|
||||
}
|
||||
|
||||
type Claims struct {
|
||||
User User `json:"user"`
|
||||
Exp uint64 `json:"exp"`
|
||||
jwt.RegisteredClaims
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue