(ctx context.Context, id string)
| 263 | } |
| 264 | |
| 265 | func (p *Persister) mySQLDeleteLoginSession(ctx context.Context, id string) (_ *flow.LoginSession, err error) { |
| 266 | ctx, span := p.r.Tracer(ctx).Tracer().Start(ctx, "persistence.sql.mySQLDeleteLoginSession") |
| 267 | defer otelx.End(span, &err) |
| 268 | |
| 269 | var session flow.LoginSession |
| 270 | if err := p.Connection(ctx).Transaction(func(tx *pop.Connection) error { |
| 271 | if err := tx.Where("id = ? AND nid = ?", id, p.NetworkID(ctx)).First(&session); err != nil { |
| 272 | return err |
| 273 | } |
| 274 | |
| 275 | return tx.RawQuery( |
| 276 | `DELETE FROM hydra_oauth2_authentication_session WHERE id = ? AND nid = ?`, |
| 277 | id, p.NetworkID(ctx), |
| 278 | ).Exec() |
| 279 | }); err != nil { |
| 280 | return nil, sqlcon.HandleError(err) |
| 281 | } |
| 282 | |
| 283 | return &session, nil |
| 284 | } |
| 285 | |
| 286 | func (p *ConsentPersister) FindGrantedAndRememberedConsentRequest(ctx context.Context, client, subject string) (_ *flow.Flow, err error) { |
| 287 | ctx, span := p.d.Tracer(ctx).Tracer().Start(ctx, "persistence.sql.FindGrantedAndRememberedConsentRequest") |
no test coverage detected