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

Method GetOidcToken

internal/repository/oidc_queries.sql.go:397–412  ·  view source on GitHub ↗
(ctx context.Context, accessTokenHash string)

Source from the content-addressed store, hash-verified

395`
396
397func (q *Queries) GetOidcToken(ctx context.Context, accessTokenHash string) (OidcToken, error) {
398 row := q.db.QueryRowContext(ctx, getOidcToken, accessTokenHash)
399 var i OidcToken
400 err := row.Scan(
401 &i.Sub,
402 &i.AccessTokenHash,
403 &i.RefreshTokenHash,
404 &i.CodeHash,
405 &i.Scope,
406 &i.ClientID,
407 &i.TokenExpiresAt,
408 &i.RefreshTokenExpiresAt,
409 &i.Nonce,
410 )
411 return i, err
412}
413
414const getOidcTokenByRefreshToken = `-- name: GetOidcTokenByRefreshToken :one
415SELECT sub, access_token_hash, refresh_token_hash, code_hash, scope, client_id, token_expires_at, refresh_token_expires_at, nonce FROM "oidc_tokens"

Callers 1

GetAccessTokenMethod · 0.80

Calls 1

QueryRowContextMethod · 0.80

Tested by

no test coverage detected