Live video on the AT Protocol
79
fork

Configure Feed

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

oproxy: roll nonce on token requests

Eli Mallon fed69a13 acd6b862

+15
+15
pkg/oproxy/handlers.go
··· 139 139 if err != nil { 140 140 return err 141 141 } 142 + jkt, _, err := getJKT(dpopHeader) 143 + if err != nil { 144 + return err 145 + } 146 + sess, err := o.loadOAuthSession(jkt) 147 + if err != nil { 148 + return err 149 + } 150 + sess.DownstreamDPoPNonce = makeNonce() 151 + err = o.updateOAuthSession(sess.DownstreamDPoPJKT, sess) 152 + if err != nil { 153 + return err 154 + } 155 + c.Response().Header().Set("DPoP-Nonce", sess.DownstreamDPoPNonce) 156 + 142 157 return c.JSON(http.StatusOK, res) 143 158 } 144 159