Update JWT to use Extended rather than Extend

pull/10616/head
Chris Goller 2017-04-17 10:57:33 -05:00
parent f6aedc85a0
commit 778cb19f57
2 changed files with 3 additions and 3 deletions

View File

@ -122,8 +122,8 @@ func (j *JWT) Create(ctx context.Context, user Principal) (Token, error) {
return Token(t), nil
}
// ExtendPrincipal sets the expires at to be the current time plus the extention into the future
func (j *JWT) ExtendPrincipal(ctx context.Context, principal Principal, extension time.Duration) (Principal, error) {
// ExtendedPrincipal sets the expires at to be the current time plus the extention into the future
func (j *JWT) ExtendedPrincipal(ctx context.Context, principal Principal, extension time.Duration) (Principal, error) {
// Extend the time of expiration. Do not change IssuedAt as the
// lifetime of the token is extended, but, NOT the original time
// of issue. This is used to enforce a maximum lifetime of a token

View File

@ -3,4 +3,4 @@ package oauth2
import "time"
// DefaultNowTime returns UTC time at the present moment
const DefaultNowTime = func() time.Time { return time.Now().UTC() }
var DefaultNowTime = func() time.Time { return time.Now().UTC() }