alpha
Login
or
Join now
alice.pds.demo.boltless.dev
/
core
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
This repository has no description
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Overview
Issues
2
Pulls
1
Pipelines
simplify time in few places
author
Akshay
date
2 years ago
(Feb 5, 2025, 12:34 PM UTC)
commit
8cb05b36
8cb05b36579a44308d4431ae8c44673c9dc45502
parent
acbbc278
acbbc278ee9a7341253aa06ff1a19d397e2a9277
+2
-4
4 changed files
Expand all
Collapse all
Unified
Split
appview
auth
auth.go
consts.go
state
middleware.go
state.go
+1
-1
appview/auth/auth.go
View file
Reviewed
···
145
145
clientSession.Values[appview.SessionPds] = pdsEndpoint
146
146
clientSession.Values[appview.SessionAccessJwt] = atSessionish.GetAccessJwt()
147
147
clientSession.Values[appview.SessionRefreshJwt] = atSessionish.GetRefreshJwt()
148
148
-
clientSession.Values[appview.SessionExpiry] = time.Now().Add(time.Hour).Format(appview.TimeLayout)
148
148
+
clientSession.Values[appview.SessionExpiry] = time.Now().Add(time.Hour).Format(time.RFC3339)
149
149
clientSession.Values[appview.SessionAuthenticated] = true
150
150
return clientSession.Save(r, w)
151
151
}
-1
appview/consts.go
View file
Reviewed
···
10
10
SessionRefreshJwt = "refreshJwt"
11
11
SessionExpiry = "expiry"
12
12
SessionAuthenticated = "authenticated"
13
13
-
TimeLayout = "2006-01-02 15:04:05.999999999 -0700 MST"
14
13
SqliteDbPath = "appview.db"
15
14
)
+1
-1
appview/state/middleware.go
View file
Reviewed
···
28
28
// refresh if nearing expiry
29
29
// TODO: dedup with /login
30
30
expiryStr := session.Values[appview.SessionExpiry].(string)
31
31
-
expiry, err := time.Parse(appview.TimeLayout, expiryStr)
31
31
+
expiry, err := time.Parse(time.RFC3339, expiryStr)
32
32
if err != nil {
33
33
log.Println("invalid expiry time", err)
34
34
return
-1
appview/state/state.go
View file
Reviewed
···
16
16
lexutil "github.com/bluesky-social/indigo/lex/util"
17
17
"github.com/gliderlabs/ssh"
18
18
"github.com/go-chi/chi/v5"
19
19
-
"github.com/google/uuid"
20
19
tangled "github.com/sotangled/tangled/api/tangled"
21
20
"github.com/sotangled/tangled/appview"
22
21
"github.com/sotangled/tangled/appview/auth"