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

Signed-off-by: brookjeynes <me@brookjeynes.dev>

authored by brookjeynes.dev and committed by Tangled d701f58c 2de6115f

Changed files
+7
internal
server
+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 {