- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for ExpToInt64 (0.08 sec)
-
internal/auth/credentials.go
} var timeSentinel = time.Unix(0, 0).UTC() // ErrInvalidDuration invalid token expiry var ErrInvalidDuration = errors.New("invalid token expiry") // ExpToInt64 - convert input interface value to int64. func ExpToInt64(expI interface{}) (expAt int64, err error) { switch exp := expI.(type) { case string: expAt, err = strconv.ParseInt(exp, 10, 64) case float64: expAt, err = int64(exp), nil
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue May 28 17:14:16 UTC 2024 - 12K bytes - Viewed (0) -
internal/config/identity/openid/jwt.go
expStr := claims["exp"] if expStr == "" { return ErrTokenExpired } // No custom duration requested, the claims can be used as is. if dsecs == "" { return nil } if _, err := auth.ExpToInt64(expStr); err != nil { return err } defaultExpiryDuration, err := GetDefaultExpiration(dsecs) if err != nil { return err }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Sep 06 02:46:36 UTC 2024 - 8.4K bytes - Viewed (0) -
cmd/site-replication.go
claims, err := auth.ExtractClaims(stsCred.SessionToken, secretKey) if err != nil { return fmt.Errorf("STS credential could not be verified: %w", err) } mapClaims := claims.Map() expiry, err := auth.ExpToInt64(mapClaims["exp"]) if err != nil { return fmt.Errorf("Expiry claim was not found: %v: %w", mapClaims, err) } cred := auth.Credentials{ AccessKey: stsCred.AccessKey,
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Aug 15 12:04:40 UTC 2024 - 185.1K bytes - Viewed (0)