sessions #2

Merged
admin merged 63 commits from sessions into main 2025-06-16 19:03:01 +02:00
51 changed files with 2525 additions and 192 deletions
Showing only changes of commit 20173ea140 - Show all commits

View File

@ -20,7 +20,7 @@ INSERT INTO service_sessions (
) VALUES ( ) VALUES (
$1, $2, $3, NOW(), $4, $5, $1, $2, $3, NOW(), $4, $5,
$6, $7, $8, $9, $6, $7, $8, $9,
TRUE, $8, $9 TRUE, $10, $11
) )
RETURNING id, service_id, client_id, user_id, issued_at, expires_at, last_active, ip_address, user_agent, access_token_id, refresh_token_id, is_active, revoked_at, scope, claims RETURNING id, service_id, client_id, user_id, issued_at, expires_at, last_active, ip_address, user_agent, access_token_id, refresh_token_id, is_active, revoked_at, scope, claims
` `
@ -35,6 +35,8 @@ type CreateServiceSessionParams struct {
UserAgent *string `json:"user_agent"` UserAgent *string `json:"user_agent"`
AccessTokenID *uuid.UUID `json:"access_token_id"` AccessTokenID *uuid.UUID `json:"access_token_id"`
RefreshTokenID *uuid.UUID `json:"refresh_token_id"` RefreshTokenID *uuid.UUID `json:"refresh_token_id"`
Scope *string `json:"scope"`
Claims []byte `json:"claims"`
} }
func (q *Queries) CreateServiceSession(ctx context.Context, arg CreateServiceSessionParams) (ServiceSession, error) { func (q *Queries) CreateServiceSession(ctx context.Context, arg CreateServiceSessionParams) (ServiceSession, error) {
@ -48,6 +50,8 @@ func (q *Queries) CreateServiceSession(ctx context.Context, arg CreateServiceSes
arg.UserAgent, arg.UserAgent,
arg.AccessTokenID, arg.AccessTokenID,
arg.RefreshTokenID, arg.RefreshTokenID,
arg.Scope,
arg.Claims,
) )
var i ServiceSession var i ServiceSession
err := row.Scan( err := row.Scan(