22 lines
325 B
Go
22 lines
325 B
Go
package types
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/google/uuid"
|
|
)
|
|
|
|
type SignedToken struct {
|
|
Token string
|
|
ExpiresAt time.Time
|
|
ID uuid.UUID
|
|
}
|
|
|
|
func NewSignedToken(token string, expiresAt time.Time, jti uuid.UUID) *SignedToken {
|
|
return &SignedToken{
|
|
Token: token,
|
|
ExpiresAt: expiresAt,
|
|
ID: jti,
|
|
}
|
|
}
|