MCPcopy
hub / github.com/ory/hydra / InvalidateDeviceCodeSession

Method InvalidateDeviceCodeSession

persistence/sql/persister_device.go:200–209  ·  view source on GitHub ↗

InvalidateDeviceCodeSession invalidates a device code session. Implements DeviceAuthStorage.

(ctx context.Context, signature string)

Source from the content-addressed store, hash-verified

198
199// InvalidateDeviceCodeSession invalidates a device code session. Implements DeviceAuthStorage.
200func (p *Persister) InvalidateDeviceCodeSession(ctx context.Context, signature string) (err error) {
201 ctx, span := p.r.Tracer(ctx).Tracer().Start(ctx, "persistence.sql.InvalidateDeviceCodeSession")
202 defer otelx.End(span, &err)
203
204 /* #nosec G201 table is static */
205 return sqlcon.HandleError(
206 p.QueryWithNetwork(ctx).
207 Where("device_code_signature = ?", signature).
208 Delete(DeviceRequestSQL{}))
209}
210
211// GetUserCodeSession returns a user code session from the database. Implements FositeStorer.
212func (p *Persister) GetUserCodeSession(ctx context.Context, signature string, session fosite.Session) (_ fosite.DeviceRequester, err error) {

Callers

nothing calls this directly

Implementers 1

BasePersisterpersistence/sql/persister.go

Calls 3

QueryWithNetworkMethod · 0.80
TracerMethod · 0.65
DeleteMethod · 0.45

Tested by

no test coverage detected