Yōten: A social tracker for your language learning journey built on the atproto.

feat(oauth/handler): add client name and uri to metadata responses #27

merged opened by brookjeynes.dev targeting master from push-lxlnpvpwlntv
Labels

None yet.

Participants 1
AT URI
at://did:plc:4mj54vc4ha3lh32ksxwunnbh/sh.tangled.repo.pull/3m4d7dmmkp322
+7
Diff #0
+2
internal/server/oauth/consts.go
··· 1 package oauth 2 3 const ( 4 SessionName = "yoten-oauth-session-v2" 5 SessionHandle = "handle" 6 SessionDid = "did"
··· 1 package oauth 2 3 const ( 4 + ClientName = "Yoten" 5 + ClientURI = "yoten.app" 6 SessionName = "yoten-oauth-session-v2" 7 SessionHandle = "handle" 8 SessionDid = "did"
+5
internal/server/oauth/handler.go
··· 30 } 31 32 func (o *OAuth) clientMetadata(w http.ResponseWriter, r *http.Request) { 33 doc := o.ClientApp.Config.ClientMetadata() 34 doc.JWKSURI = &o.JwksUri 35 36 w.Header().Set("Content-Type", "application/json") 37 if err := json.NewEncoder(w).Encode(doc); err != nil {
··· 30 } 31 32 func (o *OAuth) clientMetadata(w http.ResponseWriter, r *http.Request) { 33 + clientName := ClientName 34 + clientUri := ClientURI 35 + 36 doc := o.ClientApp.Config.ClientMetadata() 37 doc.JWKSURI = &o.JwksUri 38 + doc.ClientName = &clientName 39 + doc.ClientURI = &clientUri 40 41 w.Header().Set("Content-Type", "application/json") 42 if err := json.NewEncoder(w).Encode(doc); err != nil {

History

1 round 0 comments
sign up or login to add to the discussion
brookjeynes.dev submitted #0
1 commit
expand
feat(oauth/handler): add client name and uri to metadata responses
expand 0 comments
pull request successfully merged