Skip to content

Commit

Permalink
feat: update driver execution to get access token and add it to autho…
Browse files Browse the repository at this point in the history
…rization header
  • Loading branch information
kalil-pelissier committed Oct 17, 2024
1 parent dbedad4 commit 706b0ef
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions trino/trino.go
Original file line number Diff line number Diff line change
Expand Up @@ -921,6 +921,14 @@ func (st *driverStmt) exec(ctx context.Context, args []driver.NamedValue) (*stmt
continue
}

if arg.Name == accessTokenConfig {
if st.conn.forwardAuthorizationHeader {
token := arg.Value.(string)
hs.Add(authorizationHeader, getAuthorization(token))
}
continue
}

s, err := Serial(arg.Value)
if err != nil {
return nil, err
Expand Down

0 comments on commit 706b0ef

Please sign in to comment.