func DecodeAuthToken(token string) (username string, created time.Time, err error) {
	payload, err := base64.RawURLEncoding.DecodeString(token)
	if err != nil {
		return username, created, err
	}
	parts := bytes.SplitN(payload, []byte(":"), 3)
	if len(parts) < 3 {
		return username, created, errors.New("invalid payload")
	}
	seconds, err := strconv.ParseInt(string(parts[1]), 16, 64)
	if err != nil {
		return username, created, fmt.Errorf("invalid timestamp '%s'", string(parts[1]))
	}
	return string(parts[0]), time.Unix(seconds, 0), nil
}
// DecodeAuthToken decodes an auth token, extracting the username and token
// token creation time. To validate the authenticity of the token, use
// ValidatePBKDF2().
DecodeAuthToken decodes an auth token, extracting the username and token
token creation time. To validate the authenticity of the token, use
ValidatePBKDF2().
// DecodeAuthToken decodes an auth token extracting the username and token // token creation time . To validate the authenticity of the token use // ValidatePBKDF2 () .
func DecodeAuthToken(token string) (username string, created time.Time, err error) {
	payload, err := base64.RawURLEncoding.DecodeString(token)
	if err != nil {
		return username, created, err
	}
	parts := bytes.SplitN(payload, []byte(":"), 3)
	if len(parts) < 3 {
		return username, created, errors.New("invalid payload")
	}
	seconds, err := strconv.ParseInt(string(parts[1]), 16, 64)
	if err != nil {
		return username, created, fmt.Errorf("invalid timestamp '%s'", string(parts[1]))
	}
	return string(parts[0]), time.Unix(seconds, 0), nil
}
func DecodeAuthToken ( token string ) ( username string , created time . Time , err error ) { payload , err := base64 . RawURLEncoding . DecodeString ( token ) if err != nil { return username , created , err } parts := bytes . SplitN ( payload , [ ] byte ( " " ) , 3 ) if len ( parts ) < 3 { return username , created , errors . New ( " " ) } seconds , err := strconv . ParseInt ( string ( parts [ 1 ] ) , 16 , 64 ) if err != nil { return username , created , fmt . Errorf ( " " , string ( parts [ 1 ] ) ) } return string ( parts [ 0 ] ) , time . Unix ( seconds , 0 ) , nil }
DecodeAuthToken decodes an auth token, extracting the username and token
token creation time.
DecodeAuthToken decodes an auth token extracting the username and token token creation time .