InvalidateDeviceCodeSession invalidates a device code session. Implements DeviceAuthStorage.
(ctx context.Context, signature string)
| 198 | |
| 199 | // InvalidateDeviceCodeSession invalidates a device code session. Implements DeviceAuthStorage. |
| 200 | func (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. |
| 212 | func (p *Persister) GetUserCodeSession(ctx context.Context, signature string, session fosite.Session) (_ fosite.DeviceRequester, err error) { |
nothing calls this directly
no test coverage detected