 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Overview ¶
Package jwt provides a service to create and verify JWT auth tokens for the forum web app.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service interface {
	Create(userID int64) (token string, err error)
	Verify(token string) (userID int64, issuedAt time.Time, err error)
}
    Service is a JWT helper service that creates and verifies auth tokens.
func NewService ¶
NewService creates a new JWT service using the given secret (32-byte hex-encoded).
 Click to show internal directories. 
   Click to hide internal directories.