this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

refactor to v2 of jwx libraries

+16 -16
+1 -1
api/plc_test.go
··· 8 8 "fmt" 9 9 "testing" 10 10 11 - "github.com/lestrrat-go/jwx/jwk" 11 + "github.com/lestrrat-go/jwx/v2/jwk" 12 12 did "github.com/whyrusleeping/go-did" 13 13 ) 14 14
+2 -2
cmd/gosky/main.go
··· 24 24 "github.com/ipfs/go-cid" 25 25 logging "github.com/ipfs/go-log" 26 26 "github.com/joho/godotenv" 27 - "github.com/lestrrat-go/jwx/jwa" 28 - "github.com/lestrrat-go/jwx/jwk" 27 + "github.com/lestrrat-go/jwx/v2/jwa" 28 + "github.com/lestrrat-go/jwx/v2/jwk" 29 29 "github.com/polydawn/refmt/cbor" 30 30 rejson "github.com/polydawn/refmt/json" 31 31 "github.com/polydawn/refmt/shared"
+2 -2
labeling/util.go
··· 5 5 "fmt" 6 6 "os" 7 7 8 - "github.com/lestrrat-go/jwx/jwa" 9 - jwk "github.com/lestrrat-go/jwx/jwk" 8 + "github.com/lestrrat-go/jwx/v2/jwa" 9 + "github.com/lestrrat-go/jwx/v2/jwk" 10 10 "github.com/whyrusleeping/go-did" 11 11 ) 12 12
+5 -5
pds/auth.go
··· 8 8 "time" 9 9 10 10 "github.com/bluesky-social/indigo/xrpc" 11 - "github.com/lestrrat-go/jwx/jwa" 12 - jwt "github.com/lestrrat-go/jwx/jwt" 11 + "github.com/lestrrat-go/jwx/v2/jwa" 12 + "github.com/lestrrat-go/jwx/v2/jwt" 13 13 ) 14 14 15 15 const actorUserDeclarationCid = "bafyreid27zk7lbis4zw5fz4podbvbs4fc5ivwji3dmrwa6zggnj4bnd57u" ··· 32 32 rand.Read(rval) 33 33 refreshTok.Set("jti", base64.StdEncoding.EncodeToString(rval)) 34 34 35 - accSig, err := jwt.Sign(accessTok, jwa.HS256, s.jwtSigningKey) 35 + accSig, err := jwt.Sign(accessTok, jwt.WithKey(jwa.HS256, s.jwtSigningKey)) 36 36 if err != nil { 37 37 return nil, fmt.Errorf("signing access token: %w", err) 38 38 } 39 39 40 - refSig, err := jwt.Sign(refreshTok, jwa.HS256, s.jwtSigningKey) 40 + refSig, err := jwt.Sign(refreshTok, jwt.WithKey(jwa.HS256, s.jwtSigningKey)) 41 41 if err != nil { 42 42 return nil, fmt.Errorf("signing refresh token: %w", err) 43 43 } ··· 60 60 rval := make([]byte, 10) 61 61 rand.Read(rval) 62 62 63 - accSig, err := jwt.Sign(accessTok, jwa.HS256, s.jwtSigningKey) 63 + accSig, err := jwt.Sign(accessTok, jwt.WithKey(jwa.HS256, s.jwtSigningKey)) 64 64 if err != nil { 65 65 return nil, err 66 66 }
+1 -1
pds/handlers.go
··· 11 11 appbskytypes "github.com/bluesky-social/indigo/api/bsky" 12 12 lexutil "github.com/bluesky-social/indigo/lex/util" 13 13 "github.com/ipfs/go-cid" 14 - jwt "github.com/lestrrat-go/jwx/jwt" 14 + "github.com/lestrrat-go/jwx/v2/jwt" 15 15 ) 16 16 17 17 func (s *Server) handleAppBskyActorGetProfile(ctx context.Context, actor string) (*appbskytypes.ActorProfile_View, error) {
+3 -3
pds/server.go
··· 30 30 logging "github.com/ipfs/go-log" 31 31 "github.com/labstack/echo/v4" 32 32 "github.com/labstack/echo/v4/middleware" 33 - "github.com/lestrrat-go/jwx/jwa" 34 - jwk "github.com/lestrrat-go/jwx/jwk" 35 - jwt "github.com/lestrrat-go/jwx/jwt" 33 + "github.com/lestrrat-go/jwx/v2/jwa" 34 + "github.com/lestrrat-go/jwx/v2/jwk" 35 + "github.com/lestrrat-go/jwx/v2/jwt" 36 36 "github.com/whyrusleeping/go-did" 37 37 "gorm.io/gorm" 38 38 )
+2 -2
testing/repo_slice_test.go
··· 3 3 import ( 4 4 "context" 5 5 "encoding/json" 6 - "os" 7 6 "fmt" 7 + "os" 8 8 "testing" 9 9 10 - "github.com/bluesky-social/indigo/repo" 11 10 appbsky "github.com/bluesky-social/indigo/api/bsky" 11 + "github.com/bluesky-social/indigo/repo" 12 12 ) 13 13 14 14 // ipfs dag import testing/repo_slice.car