diff options
| author | James Elliott <james-d-elliott@users.noreply.github.com> | 2025-02-22 18:25:42 +1100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-22 07:25:42 +0000 |
| commit | 9c718b39888bbaafdbc623acd0efd2138b6b8068 (patch) | |
| tree | e189c54c06912763952eeb0ab081466531bd1cb8 /internal/storage/sql_provider.go | |
| parent | f67097c6cb7fe14ccac071b37d6323e17b377506 (diff) | |
feat(oidc): prompt parameter support (#8080)
This adds formal support for the prompt parameter.
Closes #2596
Signed-off-by: James Elliott <james-d-elliott@users.noreply.github.com>
Diffstat (limited to 'internal/storage/sql_provider.go')
| -rw-r--r-- | internal/storage/sql_provider.go | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/internal/storage/sql_provider.go b/internal/storage/sql_provider.go index 21c84cfe2..b5e212a28 100644 --- a/internal/storage/sql_provider.go +++ b/internal/storage/sql_provider.go @@ -1010,7 +1010,7 @@ func (p *SQLProvider) LoadOAuth2ConsentPreConfigurations(ctx context.Context, cl } // SaveOAuth2ConsentSession inserts an OAuth2.0 consent session to the storage provider. -func (p *SQLProvider) SaveOAuth2ConsentSession(ctx context.Context, consent model.OAuth2ConsentSession) (err error) { +func (p *SQLProvider) SaveOAuth2ConsentSession(ctx context.Context, consent *model.OAuth2ConsentSession) (err error) { if _, err = p.db.ExecContext(ctx, p.sqlInsertOAuth2ConsentSession, consent.ChallengeID, consent.ClientID, consent.Subject, consent.Authorized, consent.Granted, consent.RequestedAt, consent.RespondedAt, consent.Form, @@ -1022,7 +1022,7 @@ func (p *SQLProvider) SaveOAuth2ConsentSession(ctx context.Context, consent mode } // SaveOAuth2ConsentSessionSubject updates an OAuth2.0 consent session in the storage provider with the subject. -func (p *SQLProvider) SaveOAuth2ConsentSessionSubject(ctx context.Context, consent model.OAuth2ConsentSession) (err error) { +func (p *SQLProvider) SaveOAuth2ConsentSessionSubject(ctx context.Context, consent *model.OAuth2ConsentSession) (err error) { if _, err = p.db.ExecContext(ctx, p.sqlUpdateOAuth2ConsentSessionSubject, consent.Subject, consent.ID); err != nil { return fmt.Errorf("error updating oauth2 consent session subject with id '%d' and challenge id '%s' for subject '%s': %w", consent.ID, consent.ChallengeID, consent.Subject.UUID, err) } @@ -1031,7 +1031,7 @@ func (p *SQLProvider) SaveOAuth2ConsentSessionSubject(ctx context.Context, conse } // SaveOAuth2ConsentSessionResponse updates an OAuth2.0 consent session in the storage provider with the response. -func (p *SQLProvider) SaveOAuth2ConsentSessionResponse(ctx context.Context, consent model.OAuth2ConsentSession, authorized bool) (err error) { +func (p *SQLProvider) SaveOAuth2ConsentSessionResponse(ctx context.Context, consent *model.OAuth2ConsentSession, authorized bool) (err error) { if _, err = p.db.ExecContext(ctx, p.sqlUpdateOAuth2ConsentSessionResponse, authorized, consent.GrantedScopes, consent.GrantedAudience, consent.PreConfiguration, consent.ID); err != nil { return fmt.Errorf("error updating oauth2 consent session (authorized '%t') with id '%d' and challenge id '%s' for subject '%s': %w", authorized, consent.ID, consent.ChallengeID, consent.Subject.UUID, err) } @@ -1090,7 +1090,7 @@ func (p *SQLProvider) SaveOAuth2Session(ctx context.Context, sessionType OAuth2S session.Active, session.Revoked, session.Form, session.Session) if err != nil { - return fmt.Errorf("error inserting oauth2 %s session data with signature '%s' for subject '%s' and request id '%s' and challenge id '%s': %w", sessionType, session.Signature, session.Subject.String, session.RequestID, session.ChallengeID.UUID, err) + return fmt.Errorf("error inserting oauth2 %s session with signature '%s' for subject '%s' and request id '%s' and challenge id '%s': %w", sessionType, session.Signature, session.Subject.String, session.RequestID, session.ChallengeID.UUID, err) } return nil @@ -1335,3 +1335,7 @@ func (p *SQLProvider) LoadAuthenticationLogs(ctx context.Context, username strin return attempts, nil } + +var ( + _ Provider = (*SQLProvider)(nil) +) |
