Monorepo for Tangled tangled.org
859
fork

Configure Feed

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

appview/oauth/handler: fix client metadata json file path #336

open opened by edouard.paris targeting master from edouard.paris/core: fix-appview-client-metadata-path
Labels

None yet.

assignee

None yet.

Participants 1
AT URI
at://did:plc:sl7e2yuycnqjk24jdjmeuidn/sh.tangled.repo.pull/3ml6zglumt622
+6 -3
Diff #0
+4 -2
appview/oauth/handler.go
··· 31 31 func (o *OAuth) Router() http.Handler { 32 32 r := chi.NewRouter() 33 33 34 - r.Get("/oauth/client-metadata.json", o.clientMetadata) 34 + r.Get("/oauth-client-metadata.json", o.ClientMetadata) 35 35 r.Get("/oauth/jwks.json", o.jwks) 36 36 r.Get("/oauth/callback", o.callback) 37 37 return r 38 38 } 39 39 40 - func (o *OAuth) clientMetadata(w http.ResponseWriter, r *http.Request) { 40 + func (o *OAuth) ClientMetadata(w http.ResponseWriter, r *http.Request) { 41 41 doc := o.ClientApp.Config.ClientMetadata() 42 42 doc.JWKSURI = &o.JwksUri 43 43 doc.ClientName = &o.ClientName 44 44 doc.ClientURI = &o.ClientUri 45 45 doc.Scope = doc.Scope + " identity:handle" 46 + logoURI := o.ClientUri + "/static/logos/dolly_white.png" 47 + doc.LogoURI = &logoURI 46 48 47 49 w.Header().Set("Content-Type", "application/json") 48 50 if err := json.NewEncoder(w).Encode(doc); err != nil {
+1 -1
appview/oauth/oauth.go
··· 50 50 oauthConfig = oauth.NewLocalhostConfig(callbackUri, TangledScopes) 51 51 } else { 52 52 clientUri = "https://" + config.Core.AppviewHost 53 - clientId := fmt.Sprintf("%s/oauth/client-metadata.json", clientUri) 53 + clientId := fmt.Sprintf("%s/oauth-client-metadata.json", clientUri) 54 54 callbackUri := clientUri + "/oauth/callback" 55 55 oauthConfig = oauth.NewPublicConfig(clientId, callbackUri, TangledScopes) 56 56 }
+1
appview/state/router.go
··· 40 40 router.Get("/pwa-manifest.json", s.WebAppManifest) 41 41 router.Get("/robots.txt", s.RobotsTxt) 42 42 router.Get("/.well-known/security.txt", s.SecurityTxt) 43 + router.Get("/oauth-client-metadata.json", s.oauth.ClientMetadata) 43 44 44 45 userRouter := s.UserRouter(&middleware) 45 46 standardRouter := s.StandardRouter(&middleware)

History

1 round 0 comments
sign up or login to add to the discussion
edouard.paris submitted #0
1 commit
expand
appview/oauth/handler: fix client metadata json file path
no conflicts, ready to merge
expand 0 comments