(ctx context.Context, client, obfuscated string)
| 157 | } |
| 158 | |
| 159 | func (p *Persister) GetForcedObfuscatedLoginSession(ctx context.Context, client, obfuscated string) (_ *consent.ForcedObfuscatedLoginSession, err error) { |
| 160 | ctx, span := p.r.Tracer(ctx).Tracer().Start(ctx, "persistence.sql.GetForcedObfuscatedLoginSession", trace.WithAttributes(attribute.String("client", client))) |
| 161 | defer otelx.End(span, &err) |
| 162 | |
| 163 | var s consent.ForcedObfuscatedLoginSession |
| 164 | |
| 165 | if err := p.Connection(ctx).Where( |
| 166 | "client_id = ? AND subject_obfuscated = ? AND nid = ?", |
| 167 | client, |
| 168 | obfuscated, |
| 169 | p.NetworkID(ctx), |
| 170 | ).First(&s); errors.Is(err, sql.ErrNoRows) { |
| 171 | return nil, errors.WithStack(x.ErrNotFound) |
| 172 | } else if err != nil { |
| 173 | return nil, sqlcon.HandleError(err) |
| 174 | } |
| 175 | |
| 176 | return &s, nil |
| 177 | } |
| 178 | |
| 179 | func (p *ConsentPersister) CreateConsentSession(ctx context.Context, f *flow.Flow) (err error) { |
| 180 | ctx, span := p.d.Tracer(ctx).Tracer().Start(ctx, "persistence.sql.CreateConsentSession") |
nothing calls this directly
no test coverage detected