Documentation ¶
Index ¶
- func GenerateJWT(signingKey string, userID uint) (string, error)
- func HTTPRequest(ctx context.Context, method string, url string, body io.Reader, ...) (*http.Response, error)
- func LuhnValid(number int) bool
- func VerifyDeviceJWT(did string, signingKey string, tokenString string) error
- func VerifyJWT(signingKey string, tokenString string) (uint, error)
- type DeviceJWT
- type UserJWT
- func (u UserJWT) GetAudience() (jwt.ClaimStrings, error)
- func (u UserJWT) GetExpirationTime() (*jwt.NumericDate, error)
- func (u UserJWT) GetIssuedAt() (*jwt.NumericDate, error)
- func (u UserJWT) GetIssuer() (string, error)
- func (u UserJWT) GetNotBefore() (*jwt.NumericDate, error)
- func (u UserJWT) GetSubject() (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HTTPRequest ¶
func VerifyDeviceJWT ¶
Types ¶
type UserJWT ¶
type UserJWT struct { jwt.RegisteredClaims Identity uint `json:"identity"` }
func (UserJWT) GetAudience ¶
func (UserJWT) GetExpirationTime ¶
func (UserJWT) GetIssuedAt ¶
func (UserJWT) GetNotBefore ¶
func (UserJWT) GetSubject ¶
Click to show internal directories.
Click to hide internal directories.