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

Method CreateOidcToken

internal/repository/oidc_queries.sql.go:93–118  ·  view source on GitHub ↗
(ctx context.Context, arg CreateOidcTokenParams)

Source from the content-addressed store, hash-verified

91}
92
93func (q *Queries) CreateOidcToken(ctx context.Context, arg CreateOidcTokenParams) (OidcToken, error) {
94 row := q.db.QueryRowContext(ctx, createOidcToken,
95 arg.Sub,
96 arg.AccessTokenHash,
97 arg.RefreshTokenHash,
98 arg.Scope,
99 arg.ClientID,
100 arg.TokenExpiresAt,
101 arg.RefreshTokenExpiresAt,
102 arg.CodeHash,
103 arg.Nonce,
104 )
105 var i OidcToken
106 err := row.Scan(
107 &i.Sub,
108 &i.AccessTokenHash,
109 &i.RefreshTokenHash,
110 &i.CodeHash,
111 &i.Scope,
112 &i.ClientID,
113 &i.TokenExpiresAt,
114 &i.RefreshTokenExpiresAt,
115 &i.Nonce,
116 )
117 return i, err
118}
119
120const createOidcUserInfo = `-- name: CreateOidcUserInfo :one
121INSERT INTO "oidc_userinfo" (

Callers 1

GenerateAccessTokenMethod · 0.80

Calls 1

QueryRowContextMethod · 0.80

Tested by

no test coverage detected