File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -134,14 +134,23 @@ def prepare_credentials(
134134
135135 if isinstance (credentials , dict ):
136136 credentials = credentials or {}
137+
138+ username = credentials .get ("username" )
139+ if username :
140+ password = credentials .get ("password" )
141+ return ydb .StaticCredentials .from_user_password (
142+ username ,
143+ password ,
144+ )
145+
137146 token = credentials .get ("token" )
138147 if token :
139148 return ydb .AccessTokenCredentials (token )
140149
141150 service_account_json = credentials .get ("service_account_json" )
142151 if service_account_json :
143152 return ydb .iam .ServiceAccountCredentials .from_content (
144- json .dumps (service_account_json )
153+ json .dumps (service_account_json ),
145154 )
146155
147156 return ydb .AnonymousCredentials ()
You can’t perform that action at this time.
0 commit comments