Merge pull request #15 from rotblauer/fix-tokenauth-refreshexpiry
auth/jwt: RefreshJWT constructor should use JwtRefreshExpiry value
This commit is contained in:
commit
c3809c7cab
1 changed files with 1 additions and 1 deletions
|
|
@ -61,7 +61,7 @@ func (a *TokenAuth) CreateJWT(c AppClaims) (string, error) {
|
|||
// CreateRefreshJWT returns a refresh token for provided token Claims.
|
||||
func (a *TokenAuth) CreateRefreshJWT(c RefreshClaims) (string, error) {
|
||||
c.IssuedAt = time.Now().Unix()
|
||||
c.ExpiresAt = time.Now().Add(a.JwtExpiry).Unix()
|
||||
c.ExpiresAt = time.Now().Add(a.JwtRefreshExpiry).Unix()
|
||||
_, tokenString, err := a.JwtAuth.Encode(c)
|
||||
return tokenString, err
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue