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 1 package oauth 2 2 3 3 const ( 4 + ClientName = "Yoten" 5 + ClientURI = "yoten.app" 4 6 SessionName = "yoten-oauth-session-v2" 5 7 SessionHandle = "handle" 6 8 SessionDid = "did"
+5
internal/server/oauth/handler.go
··· 30 30 } 31 31 32 32 func (o *OAuth) clientMetadata(w http.ResponseWriter, r *http.Request) { 33 + clientName := ClientName 34 + clientUri := ClientURI 35 + 33 36 doc := o.ClientApp.Config.ClientMetadata() 34 37 doc.JWKSURI = &o.JwksUri 38 + doc.ClientName = &clientName 39 + doc.ClientURI = &clientUri 35 40 36 41 w.Header().Set("Content-Type", "application/json") 37 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