this repo has no description
0
fork

Configure Feed

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

remove some dead code

+1 -40
+1 -3
atproto/auth/cmd/atp-oauth-demo/main.go
··· 203 203 return 204 204 } 205 205 206 - // XXX: dpopAuthserverPrivateKey := crypto.GenerateP256PrivateKey() 207 - 208 206 callbackURL, err := url.Parse(s.Config.ClientID) 209 207 if err != nil { 210 208 http.Error(w, err.Error(), http.StatusInternalServerError) ··· 291 289 } 292 290 s.AuthStore.SaveSession(authSess) 293 291 294 - // XXX: create signed cookie session with `account_did`: 292 + // create signed cookie session, indicating account DID 295 293 sess, _ := s.CookieStore.Get(r, "oauth-demo") 296 294 sess.Values["account_did"] = authSess.AccountDID.String() 297 295 if err := sess.Save(r, w); err != nil {
-37
atproto/auth/oauth/oauth.go
··· 132 132 return &sess, nil 133 133 } 134 134 135 - /* XXX 136 - func NewOAuthClient(clientID string) OAuthClient { 137 - // TODO: include SSRF protections on http.Client{} by default 138 - c := OAuthClient{ 139 - Client: http.DefaultClient, 140 - Config: ClientConfig{ 141 - ClientID: clientID, 142 - KeyID: "0", 143 - TTL: 30 * time.Second, 144 - }, 145 - Resolver: NewResolver(), 146 - } 147 - return c 148 - } 149 - */ 150 - 151 135 type clientAssertionClaims struct { 152 136 jwt.RegisteredClaims 153 137 ··· 351 335 352 336 return &parInfo, nil 353 337 } 354 - 355 - /* XXX 356 - func ResumeAuthRequest(clientID string, info *AuthRequestData) (*Session, error) { 357 - 358 - priv, err := crypto.ParsePrivateMultibase(info.DpopKeyMultibase) 359 - if err != nil { 360 - return nil, err 361 - } 362 - 363 - sess := Session{ 364 - Client: http.DefaultClient() 365 - } 366 - 367 - c := NewOAuthClient(clientID) 368 - c.DpopSecretKey = priv 369 - //XXX ClientSecretKey 370 - //XXX HostURL: info.HostURL, 371 - c.AuthServerURL = info.AuthServerURL 372 - return &c, nil 373 - } 374 - */ 375 338 376 339 func (c *ClientConfig) SendInitialTokenRequest(ctx context.Context, authCode string, info AuthRequestData) (*TokenResponse, error) { 377 340