MCPcopy
hub / github.com/tinyauthapp/tinyauth / GetOidcTokenBySub

Method GetOidcTokenBySub

internal/repository/oidc_queries.sql.go:441–456  ·  view source on GitHub ↗
(ctx context.Context, sub string)

Source from the content-addressed store, hash-verified

439`
440
441func (q *Queries) GetOidcTokenBySub(ctx context.Context, sub string) (OidcToken, error) {
442 row := q.db.QueryRowContext(ctx, getOidcTokenBySub, sub)
443 var i OidcToken
444 err := row.Scan(
445 &i.Sub,
446 &i.AccessTokenHash,
447 &i.RefreshTokenHash,
448 &i.CodeHash,
449 &i.Scope,
450 &i.ClientID,
451 &i.TokenExpiresAt,
452 &i.RefreshTokenExpiresAt,
453 &i.Nonce,
454 )
455 return i, err
456}
457
458const getOidcUserInfo = `-- name: GetOidcUserInfo :one
459SELECT sub, name, preferred_username, email, "groups", updated_at FROM "oidc_userinfo"

Callers 1

CleanupMethod · 0.80

Calls 1

QueryRowContextMethod · 0.80

Tested by

no test coverage detected