Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ProviderSet = wire.NewSet(NewAuth)
Functions ¶
Types ¶
type Auth ¶
type Auth struct {
// contains filtered or unexported fields
}
func (*Auth) GenerateToken ¶
func (a *Auth) GenerateToken(id model.InternalID, claimsType ClaimsType, userType UserType, transferMetadata any, expire time.Duration) (string, error)
type Claims ¶
type Claims struct { InternalID model.InternalID `json:"iid,string"` Type ClaimsType `json:"ct"` UserType UserType `json:"ut"` TransferMetadata any `json:"tm,omitempty"` jwtv4.RegisteredClaims }
func FromContext ¶
type ClaimsType ¶
type ClaimsType int
const ( ClaimsTypeUnspecified ClaimsType = iota ClaimsTypeAccessToken ClaimsTypeRefreshToken ClaimsTypeUploadToken ClaimsTypeDownloadToken )
Click to show internal directories.
Click to hide internal directories.