Documentation ¶
Index ¶
Constants ¶
View Source
const ( AudienceLINE = "https://api.line.me/" DefaultExpiry = 30 * time.Minute DefaultTokenExpire = 2592000 // 30 Day )
default values
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Helper ¶
type Helper struct { //Expiry is the JWT expiry duration from now. Expiry time.Duration // TokenExp denotes the valid expiration time for the channel access token in seconds. TokenExpire int // contains filtered or unexported fields }
Helper helps to generate JWT for line
func (*Helper) GetLineJWT ¶
GetLineJWT reads from io.Reader and return JWT or error
func (*Helper) GetLineJWTFromFile ¶
GetLineJWTFromFile reads from file and return JWT or error
func (*Helper) WithExpiry ¶
WithExpiry set JWT valid duration
func (*Helper) WithTokenExpire ¶
WithTokenExpire set token expire in seconds
Click to show internal directories.
Click to hide internal directories.